【发布时间】:2016-11-12 06:43:39
【问题描述】:
将多通道图像卷积为一个通道图像时,通常只能有一个偏差变量(因为输出是一个通道)。如果要设置局部偏差,即为输出图像的每个像素设置偏差,在caffe和torch中该怎么做呢?
在 TensorFlow 中,这非常简单。您只需设置一个偏差矩阵,例如:
数据是25(height)X25(width)X48(channels)
权重是3X3(kernel size)X48(input channels)X1(output channels)
偏见是25X25,
那么,
hidden = tf.nn.conv2d(data, weights, [1, 1, 1, 1], padding='SAME')
output = tf.relu(hidden+biases)
caffe ortorch 有类似的解决方案吗?
【问题讨论】:
标签: machine-learning neural-network deep-learning caffe torch