Comments (7)
@RyanShun-511 to help narrow down the issue, please provide a list of model files (i.e., *.ptl
files) that are generated when following the steps provided in my comment above
Thank you!
from playtorch.
@RyanShun-511 , thanks for reporting this issue. We were able to reproduce it on our end and will submit a fix soon!
In the meantime, you can try if the follow steps unblock you:
cd F:\PyTorchDemo\MyFirstProject\models
- Change line 27 in
make_models.py
fromspec = Path(f"{name}.{MODEL_EXTENSION}.live.spec.json").read_text()
tospec = Path(f"{name}.{MODEL_EXTENSION}.live.spec.json").read_text(encoding="UTF-8")
python3 -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt
python make_models.py
The steps above export the ptl
models. Re-run the npx react-native run-android
to build and deploy the app in the emulator or a physical device.
from playtorch.
@raedle Thank you for your reply. Following your steps, I can see the model generated in the export_image_Classification_models function under F:\PyTorchDemo\MyFirstProject\ Models. The detr_resnet50.ptl file does not exist. Later parts of the program, such as MNIST models, may not be generated.
Excuse me, how can I solve this problem?
Description on node:
error: Error: Unable to resolve module ../../models/detr_resnet50.ptl from F:\PyTorchDemo\MyFirstProject\src\examples\ObjectDetectionExample.tsx:
None of these files exist:
- detr_resnet50.ptl
- models\detr_resnet50.ptl\index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
25 | const modelInfo: ModelInfo = {
26 | name: 'DETR',
27 | model: require('../../models/detr_resnet50.ptl'),
| ^
28 | };
29 |
30 | const objectColors = [
at ModuleResolver.resolveDependency (F:\PyTorchDemo\MyFirstProject\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:211:15)
at DependencyGraph.resolveDependency (F:\PyTorchDemo\MyFirstProject\node_modules\metro\src\node-haste\DependencyGraph.js:413:43)
at Object.resolve (F:\PyTorchDemo\MyFirstProject\node_modules\metro\src\lib\transformHelpers.js:317:42)
at resolve (F:\PyTorchDemo\MyFirstProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:629:33)
at F:\PyTorchDemo\MyFirstProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:645:26
at Array.reduce ()
at resolveDependencies (F:\PyTorchDemo\MyFirstProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:644:33)
at F:\PyTorchDemo\MyFirstProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:329:33
at Generator.next ()
at asyncGeneratorStep (F:\PyTorchDemo\MyFirstProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:137:24)
from playtorch.
@raedle Or you have the detr_resnet50.ptl model file and the model files generated in the export_mnist_model and export_NLP_models functions for me to download. I put it directly in the F:\PyTorchDemo\MyFirstProject\ Models folder.
Thank you for your careful answer.
from playtorch.
During the execution of the make_model.py file, I downloaded the model from the URL myself. You can put the program on your phone. Thank you for your answers.
from playtorch.
@raedle I have faced this problem myself, and I have generated these files.
The following are the generated files:
The file size are 353MB, so I wonder whether I should upload them to you there.
from playtorch.
The models are no longer part of the template, and with the new PlayTorch API and the PlayTorch app + Snack there are now better alternatives to experiment with on-device ML models.
Closing this issue due to inactivity. Please reopen if this is still ongoing!
from playtorch.
Related Issues (20)
- PlayTorchJSIModule not found - ios & android m2 macbook pro HOT 2
- It is not possible to convert audio float32 tensor to playable uint8 audio expected by .audioFromBytes() HOT 1
- How to specify interpolation in transforms.resize?
- AudioUtil is not working on Android
- How to convert my yolov5s.pt to yolov5s.ptl HOT 1
- resize function gives error: 'Factory function resize expects 1 argument but 4 are given.'
- Cannot scan QR code from the PlayTorch app HOT 2
- playtorchjsimodule not found
- Mac M1 tutorial failure HOT 2
- unable to load local .ptl model HOT 2
- How to export a Huggingface transfromer model? HOT 3
- react_native_pytorch_core error during gradle build HOT 15
- image data fetch
- Is there a processing step im missing when using a custom trained yolo model?
- Is this project still maintained?
- Unable to work
- CMake Error
- Android build fails | Expo app using prebuild HOT 4
- 'react_native_pytorch_core-Swift.h' file not found during ios build HOT 1
- Add how to use EAS (Expo Application Service) build within this tutorial
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 playtorch.