Hi guys.
i got some weird output from pytorch
my environment is bellow
pytorch 0.4.1
My code is
loss = torch.ones(1)*10
a = loss.detach()
print(a)
#return tensor([10.])
loss += 20
#return tensor([30.])
print(a)
is this normal?
then how can i copy tensor safely
i got same result from
a = loss.data
I appreciate any reply!
Thanks.