during training, I want to create a tensor to save some intermediate variables, like [16, 512], 16 means the length and 512 means hidden size. When I want to get variable from this tensor, like the 1st hidden state, I will create an one-hot mask like [1, 0, 0, …] to do a matrix multiply with this tensor to get the first hidden state saved in the tensor. While at this moment, will the backward can back the grad to variables which calculate the first hidden state I save in the tensor?