I’m looking for tensor.set_value()
and tensor.get_value()
equivalence in pytorch. For tensor.get_value()
it seems Tensor.numpy()
meets the demand, but for tensor.set_value()
I got no clue.
So, is there any way to set value of a pytorch tensor with numpy array? torch.from_numpy()
returns a new Tensor, so it’s not the right answer.