Are there any best practices for using torchscript with pytorch-mobile?

Are there any best practices for using torchscript with pytorch-mobile? Im currently trying to implement a conv-net with pytorch-mobile on android. The model is very slow in comparison to an identical tensorflow trained tflite model. Perhaps this might have something to do with the torchscript tracing.

Any thoughts would be appreciated

I tries freeze the graph using torch.utils.mobile_optimizer.optimize_for_mobile which is new for pytorch 1.6.0. It seems to improve performance a little but not significantly.

1 Like