Separation and generalization of ChannelwiseAffineLayer into BiasLayer
authorJeff Donahue <jeff.donahue@gmail.com>
Fri, 22 Jan 2016 23:57:47 +0000 (15:57 -0800)
committerJeff Donahue <jeff.donahue@gmail.com>
Sat, 23 Jan 2016 04:59:48 +0000 (20:59 -0800)
commit081690709e4a199824f433cc196c55c47731073f
tree9d5bf46f620e1a0f5dc4f40d05122bf9a883fcc5
parentec04197479d263d1c4801639f5635ceb3e7dcef1
Separation and generalization of ChannelwiseAffineLayer into BiasLayer
and ScaleLayer.  The behavior of ChannelwiseAffineLayer can be
reproduced by a ScaleLayer with `scale_param { bias_term: true }`.

BiasLayer and ScaleLayer each take 1 or 2 bottoms, with the output having
the same shape as the first.  The second input -- either another  bottom or a
learned parameter -- will have its axes (virtually) broadcast and tiled to have
the same shape as the first, after which elementwise addition (Bias) or
multiplication (Scale) is performed.
13 files changed:
include/caffe/layers/bias_layer.hpp [new file with mode: 0644]
include/caffe/layers/channelwise_affine_layer.hpp [deleted file]
include/caffe/layers/scale_layer.hpp [new file with mode: 0644]
src/caffe/layers/bias_layer.cpp [new file with mode: 0644]
src/caffe/layers/bias_layer.cu [new file with mode: 0644]
src/caffe/layers/channelwise_affine_layer.cpp [deleted file]
src/caffe/layers/channelwise_affine_layer.cu [deleted file]
src/caffe/layers/scale_layer.cpp [new file with mode: 0644]
src/caffe/layers/scale_layer.cu [new file with mode: 0644]
src/caffe/proto/caffe.proto
src/caffe/test/test_bias_layer.cpp [new file with mode: 0644]
src/caffe/test/test_channelwise_affine_layer.cpp [deleted file]
src/caffe/test/test_scale_layer.cpp [new file with mode: 0644]