Every Tensor in PyTorch has a to() member function. ... ones = torch.ones((2,)).cuda(0) # Create a tensor of ones of size (3,4) on same device as of "ones" ...
確定! 回上一頁