tensor value pytorch code example
Example: get value of torch tensor
Variable var containing:
0.9546
[torch.cuda.FloatTensor of size 1 (GPU 0)]
Use var.item()
Variable var containing:
0.9546
[torch.cuda.FloatTensor of size 1 (GPU 0)]
Use var.item()