Closed sebffischer closed 4 months ago
library(torch) x = nn_parameter(torch_randn(1)) class(x) #> [1] "torch_tensor" "R7" "nn_parameter" class(x$detach()) #> [1] "torch_tensor" "R7"
Created on 2024-02-12 with reprex v2.0.2
We could use a similar approach to what we did for clone, right?
Yes, I will PR it. Just noted it down here so it won't be forgotten and I did not want to include even more changes in the cloning PR.
Created on 2024-02-12 with reprex v2.0.2