-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to update torch for this plugin ? #28
Comments
Updating Pytorch Version of the pluginI did this a couple of months ago, so here you go: (Disclaimer: this can be quite a hustle, it's probably easier to compile with pytorch 1.10 if that's an option that works for you.)
flutter_pytorch_mobile:
git: git@github.com:name/path-to-your-forked-repo.git iOSOpen @ ios/flutter_pytorch_mobile.podspec:27 @ A new Flutter plugin project.
s.static_framework = true
s.public_header_files = 'Classes/**/*.h'
- s.dependency 'LibTorch', '~>1.10.0'
+ s.dependency 'LibTorch', '~>1.13.0'
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => Here we've changed the dependency After that, run pod update LibTorch for the changes to take effect (If you don't have Maybe you also need: flutter build ios AndroidOn android, pytorch mobile is specified as a gradle dependency in your forked plugin. dependencies {
implementation 'org.pytorch:pytorch_android:1.13.1'
implementation 'org.pytorch:pytorch_android_torchvision:1.13.1
} After that, sync gradle and make sure everything works in the Android build. It usually helps opening Android Studio and resolving all issues. |
@fynnmaarten I am trying to load a model that i compiled using PyTorch 2.0.0 and it is giving me an error.
How to update the torch version for this plugin ?
The text was updated successfully, but these errors were encountered: