refer to code:
use
tensor.detach().numpy()
..
import torch
tensor1 = torch.tensor([1.0,2.0],requires_grad=True)
print(tensor1)
print(type(tensor1))
tensor1 = tensor1.detach().numpy()
print(tensor1)
print(type(tensor1))
..
Thank you.
refer to code:
use
tensor.detach().numpy()
..
..
Thank you.
No comments:
Post a Comment