Pytorch-Exp for iOS
Experimental Pytorch cocoapods for iOS.
This is not the offical Pytorch iOS cocoapods. Please do not use it in production.
To install Pytorch-Exp, simply add the following code to your Podfile
For the demo purpose, the libtorch.a only supports one architecture - arm64, meaning the code can be only run on an arm64 device. And because of the size issues, the bitcode has been stripped out, so the bitcode switch in XCode should be turned off as well.
Currently there is only one public interface -
Pytorch.h. To load the TorchScript file, we can use:
to run the inference, we can use the
forward API and pass in the input tensor
auto outputs= module.forward(inputs).toTensor();
- Add a C API wrapper for C++ APIs
- Make a Swift demo
- Shrink the binary size
Pytorch-Exp is available under the MIT License. See the LICENSE.md file for more info.