Solved by tom in post #4 
              
              
                You write your numpy-like processing in PyTorch as a plain python function or better yet as a nn.Module,
run it through torch.jit.script similar to the TorchScript tutorials,
now you can use it similar to the Android tutorials.

Using a nn.Module in step 1 isn’t better in the sense that it would be…