Skip to content

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

[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()”

[Solved] OSError: [E050] Can’t find model ‘en’. It doesn’t seem to be a shortcut link, a Python package or a valid path to a data directory.

Last Updated on 2021-07-05 by Clay

Today when I use Python to process a NLP task, I get a error message:

OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
Read More »[Solved] OSError: [E050] Can’t find model ‘en’. It doesn’t seem to be a shortcut link, a Python package or a valid path to a data directory.
Exit mobile version