longcw / pytorch2caffe

Convert PyTorch model to Caffemodel
541 stars 151 forks source link

keyError:'IndexBackward' #11

Closed GeorgeBohw closed 6 years ago

GeorgeBohw commented 6 years ago

When i convert my model from pytorch to caffe,it meet with the following error: keyError:'IndexBackward' What's wrong with it ,anybody can tell me?which layer's problem?

longcw commented 6 years ago

This may be caused by tensor[i] since this project didn't implement index selection.

GeorgeBohw commented 6 years ago

@longcw thanks ,i check my code now

GeorgeBohw commented 6 years ago

@longcw Right! tensor[i] cause the problem,but now i meet with another problem "KeyError: 'CudaTransferBackward'.Do you know the reason?

longcw commented 6 years ago

I am not sure what is CudaTransferBackward represent for. But you can try to run the model on CPU for converting. (GPU operations are not supported).

GeorgeBohw commented 6 years ago

@longcw Thanks very much,i try

GeorgeBohw commented 6 years ago

@longcw Very Sorry to trouble you! I have a question,If the inputs are two variables,How should i feed the inputs in to function "pytorch2caffe(input_var, output_var, protofile, caffemodel)"

tongshiwen commented 5 years ago

@longcw Right! tensor[i] cause the problem,but now i meet with another problem "KeyError: 'CudaTransferBackward'.Do you know the reason?

How to solve the problem about keyError:'IndexBackward' ?