Closed adhara123007 closed 5 years ago
Your example works in my Python terminal (I don't have a Jupyter setup), but I had to enable GPU mode (EDIT: because our puny layer implementations do not have CPU code..):
caffe.set_device(1)
caffe.set_mode_gpu()
Is it possible that you have multiple Caffe installations, and that the wrong Python module / .so
file is loaded?
It works with my Python terminal . I will check again and close this issue.
Works
Thanks for being active here in resolving queries. This is more of a question since I am a little inexperienced with CAFFE.
I wanted to understand the functions of your custom layers like : resample_layer and data_augmentation layer (not present in the documentation).
So, I created a protxt file with these layers
name: "CaffeNet" layer { name: "data" type: "Input" top: "data" input_param { shape: { dim: 1 dim: 1 dim: 227 dim: 227 } } } layer { name: "Eltwise1" type: "Eltwise" bottom: "data" top: "data_sum" eltwise_param { operation: SUM coeff: 0.00392156862745098 } } layer { name: "Resample1" type: "Resample" bottom: "data_sum" top: "data_resample" resample_param { width: 1024 height: 1792 type: LINEAR antialias: true } }
When I try to use this network in jupyter notebook it fails. However, the layers defined in the documentation (Eltwise and Convolution) work well with the jupyter notebook.
import caffe
model_def = caffe_root + 'examples/augment.prototxt' net = caffe.Net (model_def, caffe.TEST) net.blobs['data'].data[...] = im_input output = net.forward()
As soon as I run this the kernel becomes dead. What I am missing here ?