This question has been asked before but with different context. So please dont mark it as duplicate.
I want to feedforward a network step by step. First feedforward upto some layer then get its result change it and then pass it on to the next layer. Here is the code.
forward_kwargs = {'data': blobs['data'].astype(np.float32, copy=False)}
blobs_out = net.forward(end='proposal',**forward_kwargs)
forward_kwargs = {'proposal': blobs_out}
blobs_out = net.forward(start='roi_pool_conv5',**forward_kwargs)
When it run this code, it gives error
Exception: Input blob arguments do not match net inputs.
this error comes from the file pycaffe.py
. The line in this file giving error is
if set(kwargs.keys()) != set(self.inputs):
raise Exception('Input blob arguments do not match net inputs.')
Because in prototxt file i have mentioned only two inputs data
and im_info
. But i want to input my network again from roi_pool_conv5
layer and when i send this argument as start layer to network it checks whether this blob is in the inputs or not. Clearly it is not in the inputs. I cannot mention this in input because i am unsure of dimension. Any workaround for this?