How to update config after model inited?
Hello everyone, I want to **change** the config [such as `dropout probability`] after bert inited, what should I do in transformers?

```python
# fixed seed
random.seed(args.seed)
torch.manual_seed(args.seed)
cudnn.deterministic = True

# init bert
config = AutoConfig.from_pretrained(model_name, hidden_dropout_prob=0.2, attention_probs_dropout_prob=0.2)
bert = BertModel.from_pretrained(model_name, config=config)

# then I want to change dropout_prob to 0 to run some other logits, but it seems invalid
bert.config.hidden_dropout_prob = 0
bert.config.attention_probs_dropout_prob = 0

# because out1 doesn't equals to out2 when I print them, but they should be the same when the dropout prob is 0
out1 = bert(**embeddings)
out2 = bert(**embeddings)
# out1 != out2
```
Hi,

To turn off dropout, you should put your model in evaluation mode: `model.eval()`. <|||||> > To turn off dropout, you should put your model in evaluation mode: `model.eval()`.

thanks for reply, due to certain needs, what I want is to change `drop prob` during training. Can this be achieved?
<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.