hey - i think i have a similar situation and wanted to check my method of solving it -
say i have a matrix of weights in a neural network and i want only specific elements in the matrix to be trained using backprop, say the bottom row. so i would initialize the entire matrix as random with requires_grad=True and then multiply by a matrix of zeros with the bottom row set to ones with requires_grad=False.
will this work?