I am using pycaffe to create my net and I want to set the bias term in a convolutional layer to false, but can not find anything how to do so. My code-snippet so far:
import caffe
from caffe import layers als L, params as P
n.conv1 = L.Convolution(n.data,kernel_size = 3,stride = 1,num_output=16,pad=1,weight_filler=dict(type='xavier'))
As you already mention, this is done by setting the
bias_term
parameter tofalse
. In general, you can find most layers and their parameters documented in the Layer Catalogue. You can set any parameter from PyCaffe by simply using the documented names and values from the Layer catalogue. Just remember, that you have to use correct Python syntax, i.e.False
and notfalse
!This will create the following entry in the
.prototxt
file:As you can see, the option is recognized correctly and put inside the
convolution_param
block.