Comments (1)
Updating Pytorch Version of the plugin
I 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.)
- Fork this repository to have a local copy.
- Open your project's
pubspec.yml
and update the version to the forked one.
flutter_pytorch_mobile:
git: [email protected]:name/path-to-your-forked-repo.git
iOS
Open flutter_pytorch_mobile/ios/flutter_pytorch_mobile.podspec
in your forked plugin.
Change the version you want to change, on iOS it's called LibTorch
@ 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 s.dependency 'LibTorch
to 1.13 as an example.
❗ You'll to check which version you need that works with PyTorch 2.0.0
After that, run
pod update LibTorch
for the changes to take effect (If you don't have pod
, you need to install Cocabods)
Maybe you also need:
flutter build ios
Android
On android, pytorch mobile is specified as a gradle dependency in your forked plugin.
Open flutter_pytorch_mobile/android/build.gradle
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.
Finally, don't forget to commit and push your changes.
from flutter_pytorch_mobile.
Related Issues (20)
- can this package support GAN right now? HOT 4
- Exceptions are muted on Java-level code
- Error When Loading the Model HOT 2
- Update to Flutter 3.0
- Using mobile GPU HOT 1
- Can read yolov5 model? HOT 2
- Does `predictImage` support other models besides image classification models? HOT 17
- Error When Loading the yolov5s.pt HOT 3
- Possible memory leak in iOS plugin
- Target c10 directly on Android HOT 19
- Build failed due to deprecated Android v1 embedding
- Crash when using --release HOT 4
- Real-time inference HOT 1
- Your input type float32 (Float) does not match with model input type HOT 1
- add support for windows to run Demucs Music Source Separation
- Official Support
- Get variable is not initialised error
- Memory Leak issue in iOS
- # Title: [BUG] Object Detection Not Updating After Initial Detection on Real Device
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_pytorch_mobile.