fbelderink / flutter_pytorch_mobile

A flutter plugin for pytorch model inference. Supports image models as well as custom models.
https://pub.dev/packages/pytorch_mobile
Other
101 stars 52 forks source link

PyTorch version issues #3

Closed satyajitghana closed 3 years ago

satyajitghana commented 4 years ago

Is the package updated to use the latest pytorch mobile ?

E/PyTorchMobile(26080): assets/yolov5s.torchscript.pt is not a proper model
E/PyTorchMobile(26080): com.facebook.jni.CppException: version_ <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at ../caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. Attempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at ../caffe2/serialize/inline_container.cc:132)
anargu commented 4 years ago

It throws me the same error, Is it not related to the model itself rather than the plugin? or it definitely is related to torch/plugin dependencies?.

satyajitghana commented 4 years ago

It throws me the same error, Is it not related to the model itself rather than the plugin? or it definitely is related to torch/plugin dependencies?.

yes, its not the model, its the pytorch android/ios plugin version being used. i think its best to write android native code and hook it up with flutter, i was successful in doing so here: https://github.com/satyajitghana/pytorch_flutter/tree/b53df77bd9ba55b119b7649825089466365db202 it supports pytorch 1.6.0

fbelderink commented 3 years ago

There is a new version of pytorch_mobile which supports pytorch version 1.6.0!