Doing a tutorial and I cannot run the caffe2 model because of an error
Tensor type mismatch, caller expects elements to be float, while tensor contains double.
I found an issue where an answer is suggested (saying, given the error OP had, to use HalfToFloat
) but no example is given, and googling returns no relevant results (the code that one finds is completely out of date).
So, I assume somewhere in the API there is a DoubleToFloat
method, where is it and how do I call it.
edit: As grepping through the pytorch repo returns zero results for DoubleToFloat
, I’m thinking the error is because of something else. My model is a RNN, and I am not inputting a hidden state, so maybe the error is because of that?