Is there a correct way to detach a loaded model, when we don’t need to compute its gradients ?
For the moment, I’m doing that:
model = torch.load('mymodel.pth')
for variable in model.parameters():
    variable.detach_()

Here, I am lucky because the model contains Variable parameters, but it could contain sub-models…