get value of torch tensor
Variable var containing:
0.9546
[torch.cuda.FloatTensor of size 1 (GPU 0)]
Use var.item()
Are there any code examples left?
New code examples in category Python
Variable var containing:
0.9546
[torch.cuda.FloatTensor of size 1 (GPU 0)]
Use var.item()