What is the difference between Trainer.evaluate() and Trainer.predict()?
So these are the 2 tutorials I am looking at for Image Classification using ViTs:huggingface.coFine-Tune ViT for Image Classification with 🤗 TransformersWe’re on a journey to advance and democratize artificial intelligence through open source and open science.AI Summer – 3 Jun 21A complete Hugging Face tutorial: how to build and train a vision transformer...Learn about the Hugging Face ecosystem with a hands-on tutorial on the datasets and transformers library. Explore how to fine tune a Vision Transformer (ViT)However, the first one from Huggingface uses trainer.evaluate() to output the metrics, while AI Summer uses trainer.predict(). Is there any substantial difference between the two or are they interchangeable?FYI, the models I am using are ‘google/vit-base-patch16-224-in21k’, ‘microsoft/cvt-13’, ‘microsoft/resnet-50’, and ‘facebook/convnext-base-224-22k’.
2022-07-22T07:49:00Z
They can both be used, they just have slightly different outputs.evaluateis thought as “Evaluate on the validation dataset on labeled data” whilepredictis more of a “Predict on new unlabeled data” (but if you have labels, it will compute the metrics).