Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No "reshape_as_input" for class "caffe.Net" #101

Open
AlexofNTU opened this issue Jun 24, 2016 · 8 comments
Open

No "reshape_as_input" for class "caffe.Net" #101

AlexofNTU opened this issue Jun 24, 2016 · 8 comments

Comments

@AlexofNTU
Copy link

Dear all:
I am trying to use Faster R-CNN

However, there is an error message coming from executing script_faster_rcnn_demo.m
The error message is
No appropriate method, property, or field 'reshape_as_input' for class 'caffe.Net'
in proposal_im_detect.m

Can anyone give me a clue about how to solve this issue?
Thanks

Alex

@choasup
Copy link

choasup commented Jul 4, 2016

You should amend the 'detection_test.prototxt' like the 'detection_test.prototxt' in output that you download.

@wangxiao5791509
Copy link

@AlexofNTU I met the same problem as yours, and I have another question, i.e.
It stucked in Stage 1, and the terminal shown me this:
File not found: ./models/rpn_prototxts/ZF/train_vali.prototxt
But the file really existing in this path, it really confused me. Waiting for answers online ...

Thanks for every kind answers ...

@Zy-Zhang
Copy link

@wangxiao5791509 I've met this problem before. Just try to rewrite all '' into '//' in solver.prototxt file. I fixed it by this method.

@Mato98
Copy link

Mato98 commented Nov 3, 2016

Did anyone solve the problem "No appropriate method, property, or field 'reshape_as_input' for class 'caffe.Net'" in proposal_im_detect.m? I get the same when running "script_faster_rcnn_demo.m"

What is meant by

amend the 'detection_test.prototxt' like the 'detection_test.prototxt' in output that you download

i only have one "detection_test.ptototxt" file and it's the one i downloaded with the matlab command "fetch_faster_rcnn_final_model"

Thanks
Tobi

@Thanhpqt92
Copy link

Thanhpqt92 commented Dec 24, 2016

I can't fix this problem by the solution of @Izzy88.

Please help me to solve this one.

@sizhangyu
Copy link

I met the same problem. Has anyone solved it?

@wenguanwang
Copy link

Hi, everyone,

I suggest you should use the modified caffe offered by fasterrcnn of Ren, instead of the original caffe. The function 'net.reshape' is ONLY offered in the caffe of faster rcnn.

@wenguanwang
Copy link

Hi, guys,

I have checked the caffe code of faster rcnn. That is totally due to the version of caffe. As I mentioned, you should:

  1. use the caffe of faster rcnn and recomplie;

Or

  1. modify caffe/matlab/+caffe/Net.m by adding this function: (just copy following codes into the end of Net.m)

function reshape_as_input(self, input_data)
CHECK(iscell(input_data), 'input_data must be a cell array');
CHECK(length(input_data) == length(self.inputs), ...
'input data cell length must match input blob number');
% reshape input blobs
for n = 1:length(self.inputs)
if isempty(input_data{n})
continue;
end
input_data_size = size(input_data{n});
input_data_size_extended = [input_data_size, ones(1, 4 - length(input_data_size))];
self.blobs(self.inputs{n}).reshape(input_data_size_extended);
end
self.reshape();
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants