hi sg,
I tried to ask on the top of thatā¦
What i knew already was how u build the callbackā¦
What i dint knew was what i askedā¦hope that if some one is already doing it in any notebook ,can post the link.
hi sg,
I tried to ask on the top of thatā¦
What i knew already was how u build the callbackā¦
What i dint knew was what i askedā¦hope that if some one is already doing it in any notebook ,can post the link.
Itās definitely part of a useful abstraction, but my guess is that beginners will look at it and think: what the hell is happening here? Maybe a link to this part of the video will do.
I would go one further and guess that non-beginners would also think āWhat the hell is happening here?ā It will take some major unravelling for anyone unfamiliar with the codebase to make sense of this approach.
It does eventually seem to lead to a nice API for fastai
users though. That said the whole exercise just makes me miss C# Events. Iām unfamiliar with Swift but perhaps it can help solve problems like this without having to search through lists of methods based on the methodās string name.
Might just be my opinion Self(ācallbackā) code looks very weird. Why not just have a simple function self.invoke_callback(callback_name) instead ? Might be easier to understand it that way.
Hi mods. May I know what is Jeremyās typical process in debugging the issues that he encounters during his experimentation? Would love to see the process step by step.
I have a recollection that he mentioned this sometime before - but canāt find the reference somehow.
Thanks in advance.
ā¦ and LINQ.
I think this is where something like S4TF can be a big win.
Why must the begin_fit method in the CallbackHandler class stop executing subsequent callbacks in the list if one of the prior ones returns False?
The execution will not stop, since the loop goes like for cb in self.cbs
. We just record the fact that one of the functions returned False.
Also, Iām having trouble wrapping my mind around the concept of a Callback as a set of callbacks ā I naturally think of ābegin_fitā, āafter_fitā, etc each as a separate callback. Why would you ever need to pass in two "begin_fit"s?
We may need to do more than one things at, say, begin_fit
(i.e. when fit is called). Thus, you may want multiple callbacks per event.
That is the main reason we develop in Jupyter Notebook. Debugging or checking your outputs is super easy and that really boosts our productivity.
And the ipython debugger is great if needed!
Sounds like a fun exercise . I still underestimate the power of Jupyter notebooks as documentation :).
Iām not sure about Jeremy ā¦ but one thing I do frequently is copy the pertinent fastai code into my own notebook, rename the methods/classes so it doesnāt conflict with the fastai code, and then I sprinkle pdb.set_trace()
all over and look at the shape of things in particular as code runs.
What does Jeremy mean by āhaving the first batch right means everything is goodā?
Did he mean that the first batch must have expected behaviour in terms of mean, std, loss, etc.? Or something more implicit that Iām mising?
He means that in the first batches of training, itās crucial to have the beginning of training go well. That is why we begin with a low learning rate and warm up in 1cycle.
As far as I know, so far the schedules are set manually. Are you aware of any research that create a schedule based on the current state of the model? In order word, that determine the āphaseā the model is in by looking at it, and sets the annealing accordingly?
Is there a list of the available callbacks?
That would be cool wouldnāt it? Thatās an area weāre researching, but no results yet.
Would we use a callback if we want to be setting schedules that depend on current or recent values/statistics of different layers, or is that something that requires a different approach?
Is there a way to write tests to test all these callbacks (using TDD)? Or you just try and hope it will work as expected for edge cases?
Not sure what you mean. Itās easy to write a test for a Callback to make sure it did what it was supposed to do.
Shameless plugin: if youāre a bit rusty with decorators, Iāve written a blog post on them