Create Model
Define and load pre-trained or local weights based on our use cases.
We'll cover the following
Introduction to model creation
Model creation is the first step in building an image classification model. In this lesson, we’ll learn how to create a new model based on our desired architecture.
Import
Place the following import statement at the top of our file to import the PyTorch Image Model (timm).
import timm
Instantiate a new model
Model instantiation is via the built-in create_model(modelName)
function. The model name t is a required parameter, so we need to pass it in. We can now use it normally. To understand how the PyTorch model actually works, study the code in the following widget:
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy