[Caffe]: 关于Scale layer
来源:互联网 发布:linux系统切换输入法 编辑:程序博客网 时间:2024/06/04 00:39
Scale layer
caffe源码中给出了scale层的作用,如下:
/** * @brief Computes the elementwise product of two input Blobs, with the shape of * the latter Blob "broadcast" to match the shape of the former. * Equivalent to tiling the latter Blob, then computing the elementwise * product. Note: for efficiency and convenience, this layer can * additionally perform a "broadcast" sum too when `bias_term: true` * is set. * * The latter, scale input may be omitted, in which case it's learned as * parameter of the layer (as is the bias, if it is included). */
即,按元素计算连个输入的乘积。该过程以广播第二个输入来匹配第一个输入矩阵的大小。
也就是通过平铺第二个输入矩阵来计算按元素乘积(点乘)。
message ScaleParameter { // The first axis of bottom[0] (the first input Blob) along which to apply // bottom[1] (the second input Blob). May be negative to index from the end // (e.g., -1 for the last axis). // // For example, if bottom[0] is 4D with shape 100x3x40x60, the output // top[0] will have the same shape, and bottom[1] may have any of the // following shapes (for the given value of axis): // (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60 // (axis == 1 == -3) 3; 3x40; 3x40x60 // (axis == 2 == -2) 40; 40x60 // (axis == 3 == -1) 60 // Furthermore, bottom[1] may have the empty shape (regardless of the value of // "axis") -- a scalar multiplier. optional int32 axis = 1 [default = 1]; //指定第二个输入的形状大小,默认为axis = 1,即如例子中所示可能有(3; 3x40; 3x40x60;)三种形状。 // (num_axes is ignored unless just one bottom is given and the scale is // a learned parameter of the layer. Otherwise, num_axes is determined by the // number of axes by the second bottom.) 除了只有一个输入bottom[0]外,num_axes都将被忽略. // The number of axes of the input (bottom[0]) covered by the scale // parameter, or -1 to cover all axes of bottom[0] starting from `axis`. // Set num_axes := 0, to multiply with a zero-axis Blob: a scalar. //num_axes=-1,覆盖第一个输入的所有轴(维度);num_axes=0, 第一个输入与一个标量做点乘. optional int32 num_axes = 2 [default = 1]; //第一个输入被覆盖轴的数量,默认为1. // (filler is ignored unless just one bottom is given and the scale is // a learned parameter of the layer.) 除了只有一个输入bottom[0]外,filler都将被忽略. // The initialization for the learned scale parameter. 学习的scale参数的初始化. // Default is the unit (1) initialization, resulting in the ScaleLayer // initially performing the identity operation. 默认为单位初始化. optional FillerParameter filler = 3; // Whether to also learn a bias (equivalent to a ScaleLayer+BiasLayer, but // may be more efficient). Initialized with bias_filler (defaults to 0). optional bool bias_term = 4 [default = false]; //是否同时学习偏差bias,默认为否. optional FillerParameter bias_filler = 5; //带有偏差填充的初始化,偏差bias_filler默认为0}
0 0
- [Caffe]: 关于Scale layer
- caffe-scale layer
- [Caffe]:关于Eltwise layer
- [Caffe]:关于SPP Layer
- [Caffe]: 关于concat layer
- [Caffe]:关于Eltwise layer
- [Caffe]:关于编写specific layer
- [Caffe]:关于ReLU、LeakyReLU 、PReLU layer
- caffe中关于layer定义的笔记
- caffe layer
- caffe layer
- Caffe Convolutional Layer 记录
- Caffe: Softmax_Loss layer
- Caffe导读之layer
- caffe layer层详解
- Caffe Layer结构
- Caffe的Layer介绍
- caffe源码 layer分析
- python2.7.13安装pip
- Advanced Techniques for Mobile Robotic
- Android开发问题集合
- 运算符重载
- 关于android-fragment
- [Caffe]: 关于Scale layer
- HDOJ(HDU).1114 Piggy-Bank (DP 完全背包)
- 西电捷通TISec协议一致性自动化测试框架设计与实现
- cordova-plugin-console插件及Cordova Web页面调试整理
- 计算机基础
- C# 小知识
- jQuery在使用each及animate等方法出现卡顿
- 斐波那契数列的遍历
- 深度学习前沿算法思想