@xta0 Thank you for the update!
We’re working on a workaround right now for training in mobile by updating the weights of the model by ourself in torchscript. We can’t get it to work on libtorch 1.4 on iOS (not sure on Android). I think it may have something to do with how autograd is implemented on mobile.
For example here’s the python code compiled in PyTorch 1.4.
class TestModule(torch.nn.Module):
    def forward(self, x, y):
        z = x + y
        L = z.sum()
        L.backward()
        return x.grad, y.grad

model = torch.jit.script(TestModule(), torch.tensor([1.]), torch.tensor([1.])) 

And in iOS, the model is loaded like this

    torch::jit::script::Module testModel = torch::jit::load(testFilePath.UTF8String);

    auto result = testModel.forward({torch::rand({1}, torch::TensorOptions().requires_grad(true)), torch::rand({1}, torch::TensorOptions().requires_grad(true))});

I get the same error as the one you filed here: https://github.com/pytorch/pytorch/pull/30067 5
So reading that, I guess autograd isn’t implemented for the mobile builds? Is that still the case for libtorch 1.4?