I see it firstly use size of 224 then size of 128. But the second step reassign a new Learn. Thus, where is the model before it? I don’t think we want to retain everything with size of 128 again.
In this link, we are calling ‘Learner’ once. The data loader is called with different sizes. So, you get to reuse the Learner object and progressive sizing…
@karthikr
I see the Learner object is being called many times and assigned to the variable learner many times from your link. My code should be the same from your link
They are sections in that notebook and each section reuses names for objects or calls a function defined earlier.
Under “Progressive Resizing” section, there is code about using different image sizes. In the prior section, “Normalization”, there is code about normalization… They use the same object (eg: learn) names, but it does not mean you have to read it as one continuous block of code.
Step2 So you are saying after creating another new variable learn, we are still using the same Learner object?
Please note in the second step, it creates a new model variable too.
We are not using the same Learner object when we create new instances. I am saying each section in that notebook should be treated separately. That is,
In “Imagenette” section, we create a instance of Learner called learn.
In “Normalization” section, we create an instance of Learner called learn
Likewise, in “Progressive Resizing” and “Mixup”, we create instances of Learner object called learn.
All the above Learner objects are different.
I assumed your initial question was about “Progressive Resizing” part - there I see we create one instance of the Learner but the dataloader are two (one of size 128 and the other, of size 224)