Closed neur1n closed 4 years ago
As you've found, the .pth extension is also used for path configuration files. So you'll have to either rename it to have a different extension, or preferably put it in a package subdirectory rather than in the source code root.
For actually finding the file at runtime, see #144.
Oh I've never know it is a path configuration file. I thought that test.pth
was a dummy file.
Thank you very much.
So I'm trying to deploy a pytorch demo on an Android device, but whenever there is a
pth
file (you can treat it as a neural network model) insrc/main/python
folder, an UnicodeDecodeError exception will be raised even though the Python source code is not loading the file. This file is in binary format, which is not the same as test.pth in this repo.The normal way to load the file (while running in PC) is
But if I load it with
The same UnicodeDecodeError raised. So I assume the exception occurs during Chaquopy sourcing the files?