vvanirudh:

 hidden_states_weights[i] = attention_val



Also, in the above snippet, if I replace the assignment with this
hidden_states_weights[i] = hidden_states_weights[i] + attention_val

it shouldn’t be an in-place operation anymore, the way I understand it. But, I still get the same error.