Deep learning caffe如何使用matlab设置滤波器?
我想在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.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。你应该在这里发布答案。