Does calling fit() method on TFBertForSequenceClassification change the weights of internal pre-trained bert?
Hi all,

Let's say, I have a TFBertForSequenceClassification object and I call fit method on it. Does it change the weights of the internal TFBertMainLayer too or it only trains the weights of the Dropout and the classifier Dense layers?

Best
I can't tell for sure about the TF version, but I would assume it's the same as the one in PyTorch, in which case yes: all weights are changed. You can freeze layers, though. Here (for PyTorch nn.Module) only freezing the embeddings:

```python
bert = BertModel.from_pretrained('bert-base-uncased')
for name, param in bert.named_parameters():                
    if name.startswith('embeddings'):
        param.requires_grad = False
```<|||||>If your problem is solved, please close this.<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
