You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please ask usage and modeling questions on the mailing list. Your model has no weight initialization, and the weights default to zero, and so all of the outputs are zero.
Please do not post usage, installation, or modeling questions, or other requests for help to Issues.
Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.
i create a prototype like this
input: "data" input_shape { dim: 1 # batchsize dim: 3 # number of colour channels - rgb dim: 55 # width dim: 110 # height } layer { name: "conv1" type: "Convolution" bottom: "data" top: "conv1" param { lr_mult: 1 } param { lr_mult: 2 } convolution_param { num_output: 20 kernel_size: 4 stride: 1 } } layer { name: "conv2" type: "Convolution" bottom: "conv1" top: "conv2" param { lr_mult: 1 } param { lr_mult: 2 } convolution_param { num_output: 20 kernel_size: 4 stride: 1 } } layer { name: "pool1" type: "Pooling" bottom: "conv2" top: "pool1" pooling_param { pool: MAX kernel_size: 2 stride: 2 } } layer { name: "conv3" type: "Convolution" bottom: "pool1" top: "conv3" param { lr_mult: 1 } param { lr_mult: 2 } convolution_param { num_output: 40 kernel_size: 3 stride: 1 } } layer { name: "conv4" type: "Convolution" bottom: "conv3" top: "conv4" param { lr_mult: 1 } param { lr_mult: 2 } convolution_param { num_output: 40 kernel_size: 3 stride: 1 } } layer { name: "pool2" type: "Pooling" bottom: "conv4" top: "pool2" pooling_param { pool: MAX kernel_size: 2 stride: 2 } } layer { name: "conv5" type: "Convolution" bottom: "pool2" top: "conv5" param { lr_mult: 1 } param { lr_mult: 2 } convolution_param { num_output: 60 kernel_size: 3 stride: 1 } } layer { name: "conv6" type: "Convolution" bottom: "conv5" top: "conv6" param { lr_mult: 1 } param { lr_mult: 2 } convolution_param { num_output: 60 kernel_size: 3 stride: 1 } } layer { name: "pool3" type: "Pooling" bottom: "conv6" top: "pool3" pooling_param { pool: MAX kernel_size: 2 stride: 2 } } layer { name: "ip1" type: "InnerProduct" bottom: "pool3" top: "ip1" inner_product_param { num_output: 160 } }
and write pycaffe code like this
`caffe.set_mode_cpu()
net1
net = caffe.Net('/root/deepid3/deploy.prototxt', caffe.TRAIN)
transformer = caffe.io.Transformer({'data': net.blobs['data'].data.shape})
transformer.set_transpose('data', (2,0,1))
transformer.set_channel_swap('data', (2,1,0))
transformer.set_raw_scale('data', 255.0)
im = caffe.io.load_image(y)
net.blobs['data'].data[...] = transformer.preprocess('data', im)
out = net.forward()
print out
allways out is
{'ip1': array([[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0.]], dtype=float32)}`
i think is my problem but i found that conv1 produce just zero when i remove other layers, i start update that bust still all of output is zero, i check data layer and print data and is have true value,
how can sole that?
The text was updated successfully, but these errors were encountered: