iamhankai / cpp-pytorch

A bite of cpp api in PyTorch-1.0
165 stars 40 forks source link

make error #12

Open jiaobingle opened 5 years ago

jiaobingle commented 5 years ago

i can run 'camke ..' successfully, but when i run 'make', it shows : /home/workplace/cpp-pytorch/example-app.cpp:44:49: error: ‘class at::DeprecatedTypeProperties’ has no member named ‘tensorFromBlob’ auto img_tensor = torch::CPU(torch::kFloat32).tensorFromBlob(img_float.data, {1, 224, 224, 3}); ^ what can i do next to solve it, thx!

iamhankai commented 5 years ago

It seems that torch::CPU(torch::kFloat32) has been deprecated. Use the updated class or lower version of pytorch.

oftenliu commented 5 years ago

请问下这个问题解决了吗,我也遇到了

XWalways commented 5 years ago

I meet the same error

oftenliu commented 5 years ago

换成from_blob

Evoluange commented 4 years ago

把CPU(torch::kFloat32)去掉