Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid double key lookup on callback.py (#3018)
On method on_epoch_end, to add new keys to the history dict, first it is verified if a key is not on the history dict and if that is the case, a new key is created on the history dict with an empty list as value. However, this operation search for a key twice in the dict. This same behavior can be achieved in a single step using dict setdefault method.
- Loading branch information