hi, thx.
It has the error: the model has no ‘‘frozen_layer’’ module.
So I change it to
print(self.model.fc_layers[-2].weight.grad)
print(self.model.last_layer.weight.grad)

Since the second last layer is frozen as I wrote the code in question.
But the output is not “None”, is the gradient matrix.
So it is not working as expected I think.