If you are setting requires_grad = False for all parameters, the error message is expected, as Autograd won’t be able to calculate any gradients, since no parameter requires them.
Could you describe your use case a bit, i.e. which layers would you like to train and which should be frozen?