Skip to content

July 6, 2020

[PyTorch] How to check the model state is “train()” or “eval()”

Last Updated on 2023-02-17 by Clay

Today when I reading the document of the “Transformers” package which Hugging Face developed, I suddenly discovered the model I build, its state is “eval()”, not “train()”. It seems that as long as we use “from_pretrained()” method is the default state “eval()”.

Read More »[PyTorch] How to check the model state is “train()” or “eval()”