Closed nh9k closed 1 year ago
@nh9k, what react-native-pytorch-core
version are you using?
The model and the JavaScript code provided work on both Android (Samsung Galaxy S22) and iOS (iPhone Xs) and with the PlayTorch app (which uses react-native-pytorch-core
0.2.2
).
PlayTorch Snack url: https://snack.playtorch.dev/@raedle/post-cd-test?supportedPlatforms=my-device
@raedle, thank you very much for your testing :smiley:, but i am still getting same errors on my android Pixel 5, API 29, RAM 6GB/8GB
, Pixel 5, API 30, 8GB
, and Galaxy S9+, Android 10.0
at version react-native-core@0.2.2
:cry:....
@nh9k, what a bummer. Is this also happening with the PlayTorch Snack provided in my previous response?
I am not familiar with the expo, but I am trying it with my galaxy S9+. There is another error before the test properly.
@raedle, this Playtorch Snack is working fine on my galaxy S9+!
@nh9k, the code examples that you provided work. I can probably look into it again, but it will require a minimal and constantly reproducible example (e.g., via GitHub repo)
@raedle, thank you so much, i figure out what is the problem! :cry::cry::cry:
The problem was .ptl
model..
Your model is working fine at my native app.
Is it used same code with my question?
I copied and pasted your Python PostCD model code in Google Colab and exported the post_cd.ptl
model
https://colab.research.google.com/drive/1MPM9v6TM_q7R4SqhMSzXwCCQYNqWk63F
Current colab pytorch version is 1.12.1, but my pytorch version is 1.10.0.
I think version 1.10.0
may be the problem.
I'm always thankful and sorry to you.
@nh9k an older PyTorch version could indeed be the cause. Can you try PyTorch 1.12.1
and report back? Thank you!
@raedle, I made a mistake. My PyTorch version was 1.7.1
.
!conda list
command in jupyter notebook did not work, so I used conda list
instead.
PyTorch version 1.10.0
, 1.11.0
, and 1.12.1
were working fine on android! Thank you so much!
Tutorial Select
Prepare Custom Model
Feedback
Hello, always thanks for contributions! This is somewhat custom problem i think, so that i don't know that i can question. My simple tensor manipulation model is not working on my react-native app, but it is working successfully at my python code.
My adb logcat of several code trials sometimes got output
memory consumptions problem
or my java script code sometimes got output[Error: Exception in HostFunction: vector]
orstd::bad_alloc
or just app crashes.Can i get some help?..
Model export at python code:
Python output:
This is app code:
Node.js output:
-> App crashes