I am trying to convert np.add.at(x_padded, (slice(None), k, i, j), cols_reshaped) this numpy code to pytorch.
Tried x_padded.index_put_((slice(None), k, i, j), cols_reshaped, accumulate=True), but got TypeError: expected Tensor as element 0 in argument 0, but got slice error.
How can I convert
np.add.at(x_padded, (slice(None), k, i, j), cols_reshaped)

to pytorch?
Thanks a lot !