How to freez a model?
I usefor p in model.parameters():
            p.requires_grad = Falseto freeze a T5 model (t5-small), but when I print parameters that require grad, there is still one parameter with the size32121x512. What is this? Is it the embeddings  matrix? Should I freeze it too? It seems backward gradients affect this one remaining parameter.
2021-12-14T18:02:52Z
It seems I calledmodel.resize_token_embeddings(len(tokenizer))after freezing parameters, and it can reset the embeddings require_grad to True