Closed dfalbel closed 5 years ago
Recently in pytorch it's not recommended to modify tensor$data. We should instead use a context manager like:
tensor$data
x = torch.randn(3, requires_grad=True) print(x.requires_grad) print((x ** 2).requires_grad) with torch.no_grad(): print((x ** 2).requires_grad)
We must be able to do this from R. I am not sure how yet. I think this is the relevant file in pytorch's code.
Recently in pytorch it's not recommended to modify
tensor$data
. We should instead use a context manager like:We must be able to do this from R. I am not sure how yet. I think this is the relevant file in pytorch's code.