torch
torch copied to clipboard
support torch_device() and how it's used
Not sure if we want this:
with (cuda_device(1)), {
t1 <- torch_ones(c(2,2))
t2 <- torch_randn(c(2,4))
t1$mm(t2)
}
but we'd need something equivalent in function to
with torch.cuda.device(0):
t1 = torch.ones((2,2))
t2 = torch.randn((2,4))
t1.mm(t2)
I explored this in the #127 but didnt have success... Will wait to see if I get answers in the forum.