t=tensor([0.1 0.2 0.3 0.4 0.5 0.6])
now i need to modify this existing tensor t as follows:
t=tensor([0.1 0.2 0.7 0.4 0.8 0.6])
I tried as follows:
t=tensor([0.1 0.2 0.3 0.4 0.5 0.6])
a=tensor([0.1 0.2 0.7 0.4 0.8 0.6])
index=range(len(a))
t.index_copy_(0,index,a)
But still it is not updating how can i modify the tensor in pytorch?