I feel embarrassed asking this, but how do you adjust a single value within a tensor? Suppose you want to add '1' to only one value within your tensor?
Doing it by indexing doesn't work:
TypeError: 'Tensor' object does not support item assignment
One approach would be to build an identically shaped tensor of 0's. And then adjusting a 1 at the position you want. Then you would add the two tensors together. Again this runs into the same problem as before.
I've read through the API docs several times and can't seem to figure out how to do this. Thanks in advance!
Question&Answers:os