libtorch_cpp_mobilenetv2_5classes
libtorch_cpp_mobilenetv2_5classes copied to clipboard
c10::Error
when I run your code,it report an error that terminate called after throwing an instance of 'c10::Error' what(): Must not create a new variable from a variable, use its .data()
.It seems like the problem happens on these two lines auto img_var = torch::autograd::make_variable(img_t[0],false); auto img_var1 = torch::autograd::make_variable(img_t[1],false);,
Do you know how to solve it?
try to use an old libtorch version, this code is out of date now, sorry for that.
when I run your code,it report an error that
terminate called after throwing an instance of 'c10::Error' what(): Must not create a new variable from a variable, use its .data()
.It seems like the problem happens on these two linesauto img_var = torch::autograd::make_variable(img_t[0],false); auto img_var1 = torch::autograd::make_variable(img_t[1],false);,
Do you know how to solve it?
I updated the code with libtorch1.7.1, try it.