gmihaila / ml_things

This is where I put things I find useful that speed up my work with Machine Learning. Ever looked in your old projects to reuse those cool functions you created before? Well, this repo is designed to be a Python Library of functions I created in my previous project that can be reused. I also share some Notebooks Tutorials and Python Code Snippets.
https://gmihaila.github.io
Apache License 2.0
245 stars 61 forks source link

How to score new data after fine tuning #9

Closed sanjayb678 closed 2 years ago

sanjayb678 commented 3 years ago

I use the notebook to fine tune a custom dataset for a multi class classification task. How do I use the fine tuned model on new data to label. Thanks.

gmihaila commented 3 years ago

Hi @sanjayb678 and Thank you for your question!

You will need to save the model at the end of the code. Next, when you use it in a different code you just load it form the path you saved it.

Here is how you do it in PyTorch: https://pytorch.org/tutorials/beginner/saving_loading_models.html