please help understand below things in call back
what is the significance of res below. We have res defined in every event
res = True
for cb in self.cbs:
res = res and cb.after_backward()
in which case one would want to return false
if not cb.begin_epoch(epoch): continue
you could fx develop a callback for early stopping that returns false when the criteria for stopping is meet
Thanks few more things that is bothering me
- In every event method we have this res used in the same way
for cb in self.cbs: res = res and
Why do we need res (hardcoded to true) when we are only interested activities in the event methods like begin/after ?
- inside fit ,all batches,one batch from wherever we call event methods we have got
if Not condition return or continue…
what if dont want to do any early stopping and do any other acitivities.
Actually, for what I understood, callbacks use a reverse logic: False means keep going and True stop. This is why we have
if not cb.blabla .
return True will be deprecated in favor of Exception.