def callbacks(self): """Return all callbacks""" import skorch.callbacks callbacks = [] for name in dir(skorch.callbacks): attr = getattr(skorch.callbacks, name) # pylint: disable=unidiomatic-typecheck if not type(attr) is type: continue if issubclass(attr, skorch.callbacks.Callback): callbacks.append(attr) return callbacks
def callbacks(self): """Return all callbacks""" import skorch.callbacks callbacks = [] for name in dir(skorch.callbacks): attr = getattr(skorch.callbacks, name) # pylint: disable=unidiomatic-typecheck if not type(attr) is type: continue if issubclass(attr, skorch.callbacks.Callback): callbacks.append(attr) return callbacks