Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Deep learning caffe如何使用matlab设置滤波器?_Deep Learning_Caffe_Matcaffe - Fatal编程技术网

Deep learning caffe如何使用matlab设置滤波器?

Deep learning caffe如何使用matlab设置滤波器?,deep-learning,caffe,matcaffe,Deep Learning,Caffe,Matcaffe,我想在Caffe中使用matlab更新卷积滤波器。 我怎么做? 到目前为止,我的代码是: caffe.reset_all(); % reset caffe caffe.set_mode_gpu(); gpu_id = 0; % we will use the first gpu in this demo caffe.set_device(gpu_id); net_model = [model_dir, 'train_images.prototxt']; net = caffe.Net(net

我想在Caffe中使用matlab更新卷积滤波器。 我怎么做? 到目前为止,我的代码是:

caffe.reset_all(); % reset caffe
caffe.set_mode_gpu();
gpu_id = 0;  % we will use the first gpu in this demo
caffe.set_device(gpu_id);

net_model = [model_dir, 'train_images.prototxt'];
net = caffe.Net(net_model, 'train');

net.blobs('conv1').set_data([1,1,0]);

下面的操作很好

caffe.reset_all(); % reset caffe
caffe.set_mode_gpu();  
gpu_id = 0;  % we will use the first gpu in this demo    
caffe.set_device(gpu_id);
net_model = ['net_images.prototxt'];
net = caffe.Net(net_model, 'train')
a = zeros(1,1,3,2);
a(1,1,:,:) = [[1,0,0];[0,1,0]]'; % caffe uses BGR color channel order
         net.layers('select_B_G').params(1).set_data(a);
solver = caffe.Solver(solverFN);
solver.solve();
net.save(fullfile(model_dir, 'my_net.caffemodel'));

你的代码有什么问题吗?你必须发布至少
conv1
层的prototxt。你应该在这里发布答案。