The SaveBestModel callback doesn’t exist yet. If you implement one, don’t hesitate to suggest it in a PR (in a notebook).
The TrainingPhase object goes with GeneralScheduler, both of them are documented here with an example. recoderd.plot replaces sched.plot indeed. If you want to customize your plot, you should just copy-paste its code and add whatever you want (the losses and lrs will be in learn.recorder.losses and learn.recorder.lrs respectively).
Am I correct that apply_ftms uses random values to generate a new augmentation?
Then, the random values applied to x are different than the random values to y. In case y are bounding boxes, different transformations are applied to y.
x,y = self.ds[idx]
x = apply_tfms(self.tfms, x, **self.kwargs)
if self.tfm_y: y = apply_tfms(self.tfms, y, **self.y_kwargs)
return x, y
What do you want to do with the argument 2? It’s where the pretrained model is cut, so currently you’re cutting at the second layer of the model (instead of -2) which gives you this error. It’s best to leave it blank and let the library figure out for you where to cut in general.
The notebook looks great, I’ll get working on it to merge the content with the library.
The idea is that we (Jeremy or I) would like to do the incorporation of big contributions in the library to make sure it takes advantage of everything there is there and has the same coding style since we often find we have to rewrite a lot of things in PRs.
The downside is that you won’t get your name on a commit so we’re also creating a file (probably called CHANGES.md) where we will cite all those contributions (yours would be the first there) and link to the original notebooks where those were introduced (like the one you did).
This is an experimental process, so please don’t hesitate to give us any feedback.
Also, it’s extremely helpful if notebooks can include a few cells containing assert statements that check that things are working correctly. that way we have tests we can immediately add to the test suite. i updated CONTRIBUTING.md yesterday to mention the need for tests.
Is there a way to set batch size in the new Library. I am training a language model and it keep throwing memory error after it run till few percents. I am thinking reducing bs might solve this problem.
Would it be possible to use the information on the hardware to set the best batch size instead of using a 64 default? Similar to what is done with n_workers. If we can get the size of GPU RAM and know how much data the model uses, we could find a more suitable default, no?