Module ImportFrom alias Import alias ImportFrom alias alias Import alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body If UnaryOpNot NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot Call NameLoad NameLoad Str body Raise Call NameLoad Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults vararg body Expr Str Expr Call Call NameLoad NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Pass decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Pass decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListComp NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Str NameLoad If CompareNotIn NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Return CompareEq Call NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Return CompareEq BinOpMod NameLoad AttributeLoad NameLoad attr Num orelse Return CompareEq NameLoad AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Return CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Num decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad ListLoad Str Str Str Str Str Str Str Str Assign NameStore Call NameLoad ListLoad Str Str Str Str FunctionDef arguments args NameParam defaults kwarg body Assign AttributeStore NameLoad attr ListLoad Assign NameStore Dict Assign NameStore BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Slice ListLoad Assign NameStore Dict Str NameLoad Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If NameLoad body If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad orelse Raise Call NameLoad Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Raise Call NameLoad Str For NameStore NameLoad body If UnaryOpNot NameLoad body Assign NameStore ListLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg body Expr Str Pass decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults vararg body Expr Str For TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr body If BoolOpAnd CompareEq NameLoad NameLoad Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If BoolOpOr CompareEq NameLoad Str CompareEq NameLoad Str body Return TupleLoad TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Slice Num Return TupleLoad TupleLoad NameLoad decorator_list NameLoad decorator_list Call NameLoad NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg body Assign SubscriptStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr keyword NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call NameLoad Str Call AttributeLoad Str attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore NameLoad Expr Call NameLoad Expr Call NameLoad Call AttributeLoad Str attr BinOpMult Num Str If BoolOpAnd CompareEq NameLoad Str CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Num body Expr Call NameLoad Str orelse If CompareEq NameLoad Str body Expr Call NameLoad Str orelse If CompareEq NameLoad Str body Expr Call NameLoad Str orelse If CompareEq NameLoad Str body Expr Call NameLoad Str orelse If CompareEq NameLoad Str body Expr Call NameLoad Str Assign NameStore NameLoad Expr Call NameLoad Call AttributeLoad Str attr BinOpMult Num Str If NameLoad body Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Str attr SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Delete SubscriptDel NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr If Call NameLoad NameLoad Str body Return AttributeLoad NameLoad attr orelse If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad NameLoad Str body Return BinOpFloorDiv AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Str If CompareIs NameLoad NameLoad body Assign NameStore ListLoad Call AttributeLoad Str attr NameLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore ListLoad Call AttributeLoad Str attr NameLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr DictComp NameLoad Dict Str Str Num Num comprehension NameStore ListLoad Str Str Assign AttributeStore NameLoad attr DictComp NameLoad Dict Str Str Num Num comprehension NameStore ListLoad Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults vararg body Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index TupleLoad Str Return If CompareEq NameLoad Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str For NameStore ListLoad Str Str body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad SubscriptLoad NameLoad Index TupleLoad Str Str NameLoad Assign SubscriptStore NameLoad Index Call AttributeLoad Str attr NameLoad NameLoad BinOpSub SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Assign SubscriptStore NameLoad Index Call AttributeLoad Str attr NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad decorator_list decorator_list
N/A __future__ print_function N/A logging abc ABCMeta abstractmethod N/A progressbar six add_metaclass toolz first N/A logger N/A N/A logging getLogger __name__ callback N/A N/A func N/A N/A N/A N/A func _is_callback True N/A func N/A TrainingExtension N/A object N/A N/A The base class for training extensions.

    An extension is a set of callbacks sharing a joint context that are
    invoked at certain stages of the training procedure. These callbacks
    typically add a certain functionality to the training procedure,
    e.g. running validation on auxiliary datasets or early stopping.

    Parameters
    ----------
    name : str, optional
        The name of the extension. The names are useful in order to
        distinguish between several extensions of the same type that
        belongs to the same main loop. By default the name is set to
        the name of the class.

    Attributes
    ----------
    main_loop : :class:`.MainLoop`
        The main loop to which the extension belongs.
    name : str
        The name of the extension.

     __init__ N/A N/A self name N/A None N/A N/A N/A name N/A N/A name N/A N/A self __class__ __name__ N/A N/A self name name N/A main_loop N/A N/A self N/A N/A N/A N/A N/A hasattr self _main_loop N/A N/A N/A ValueError main loop must be assigned to extension first N/A N/A self _main_loop N/A property main_loop N/A N/A self value N/A N/A N/A N/A self _main_loop value N/A N/A main_loop setter dispatch N/A N/A self callback_name N/A args N/A N/A Runs callback with the given name.

        The reason for having this method is to allow
        the descendants of the :class:`TrainingExtension` to intercept
        callback invocations and do something with them, e.g. block
        when certain condition does not hold. The default implementation
        simply invokes the callback by its name.

         N/A N/A N/A getattr self N/A str callback_name args N/A on_resumption N/A N/A self N/A N/A N/A The callback invoked after training is resumed. N/A N/A callback on_error N/A N/A self N/A N/A N/A The callback invoked when an error occurs. N/A N/A callback before_training N/A N/A self N/A N/A N/A The callback invoked before training is started. N/A N/A callback before_epoch N/A N/A self N/A N/A N/A The callback invoked before starting an epoch. N/A N/A callback before_batch N/A N/A self batch N/A N/A N/A The callback invoked before a batch is processed.

        Parameters
        ----------
        batch : object
            The data batch to be processed.

         N/A N/A callback after_batch N/A N/A self batch N/A N/A N/A The callback invoked after a batch is processed.

        Parameters
        ----------
        batch : object
            The data batch just processed.

         N/A N/A callback after_epoch N/A N/A self N/A N/A N/A The callback invoked after an epoch is finished. N/A N/A callback after_training N/A N/A self N/A N/A N/A The callback invoked after training is finished. N/A N/A callback on_interrupt N/A N/A self N/A N/A N/A The callback invoked when training is interrupted. N/A N/A callback N/A CallbackName N/A str N/A N/A A name of a TrainingExtension callback.

    Raises
    ------
    :class:`TypeError` on comparison with a string which is not a name of
    TrainingExtension callback.

     __eq__ N/A N/A self other N/A N/A N/A callback_names N/A key N/A N/A key value N/A N/A N/A TrainingExtension __dict__ items N/A getattr value _is_callback False N/A N/A other callback_names N/A N/A N/A TypeError N/A N/A {} is not a valid callback. format other N/A N/A N/A str self other N/A N/A Predicate N/A object N/A __init__ N/A N/A self condition num N/A N/A N/A N/A self condition condition N/A N/A self num num N/A __call__ N/A N/A self log N/A N/A N/A N/A N/A N/A self condition endswith epochs N/A N/A entry N/A N/A log status N/A epochs_done N/A N/A entry N/A N/A log status N/A iterations_done N/A N/A N/A N/A self condition startswith every N/A N/A N/A N/A entry N/A self num 0 N/A N/A N/A entry N/A self num N/A N/A has_done_epochs N/A N/A log N/A N/A N/A N/A N/A N/A log status N/A epochs_done 0 N/A always_true N/A N/A log N/A N/A N/A True N/A SimpleExtension N/A TrainingExtension N/A N/A A base class for simple extensions.

    All logic of simple extensions is concentrated in the method
    :meth:`do`.  This method is called when certain conditions are
    fulfilled. The user can manage the conditions by calling the
    `add_condition` method and by passing arguments to the constructor.  In
    addition to specifying when :meth:`do` is called, it is possible to
    specify additional arguments passed to :meth:`do` under different
    conditions.

    Parameters
    ----------
    before_training : bool
        If ``True``, :meth:`do` is invoked before training.
    before_first_epoch : bool
        If ``True``, :meth:`do` is invoked before the first epoch.
    before_epoch : bool
        If ``True``, :meth:`do` is invoked before every epoch.
    on_resumption : bool, optional
        If ``True``, :meth:`do` is invoked when training is resumed.
    on_interrupt : bool, optional
        If ``True``, :meth:`do` is invoked when training is interrupted.
    after_epoch : bool
        If ``True``, :meth:`do` is invoked after every epoch.
    after_batch: bool
        If ``True``, :meth:`do` is invoked after every batch.
    after_training : bool
        If ``True``, :meth:`do` is invoked after training.
    after_n_epochs : int, optional
        If not ``None``, :meth:`do` is invoked when `after_n_epochs`
        epochs are done.
    every_n_epochs : int, optional
        If not ``None``, :meth:`do` is invoked after every n-th epoch.
    after_n_batches : int, optional
        If not ``None``, :meth:`do` is invoked when `after_n_batches`
        batches are processed.
    every_n_batches : int, optional
        If not ``None``, :meth:`do` is invoked after every n-th batch.

     N/A BOOLEAN_TRIGGERS N/A frozenset N/A before_training before_first_epoch before_epoch on_resumption on_interrupt after_epoch after_batch after_training N/A INTEGER_TRIGGERS N/A frozenset N/A after_n_epochs after_n_batches every_n_epochs every_n_batches __init__ N/A N/A self N/A kwargs N/A N/A N/A self _conditions N/A N/A super_kwargs N/A N/A trigger_keywords N/A N/A self BOOLEAN_TRIGGERS N/A self INTEGER_TRIGGERS N/A conditions N/A N/A N/A key value N/A N/A kwargs items N/A N/A N/A key trigger_keywords N/A N/A N/A conditions N/A key value N/A N/A N/A super_kwargs N/A key value N/A N/A N/A self set_conditions conditions N/A N/A N/A N/A super SimpleExtension self __init__ super_kwargs N/A set_conditions N/A N/A self N/A kwargs N/A N/A Set the conditions for which this extension should be run.

        Parameters
        ----------
        See the :class:`SimpleExtension` docstring for a list of
        possible parameters.

         N/A N/A N/A self _conditions N/A N/A N/A predicates N/A before_first_epoch has_done_epochs N/A conditions N/A before_first_epoch after_epoch after_batch every_n_batches every_n_epochs after_n_batches after_n_epochs before_epoch after_epoch after_batch after_batch after_epoch after_batch after_epoch N/A N/A key value N/A N/A kwargs items N/A N/A value N/A N/A N/A key N/A self BOOLEAN_TRIGGERS N/A N/A N/A N/A self add_condition N/A N/A N/A conditions get key key predicate N/A N/A predicates get key None N/A N/A N/A key N/A self INTEGER_TRIGGERS N/A N/A predicate N/A Predicate key value N/A N/A N/A self add_condition N/A N/A N/A conditions get key key predicate predicate N/A N/A N/A KeyError N/A N/A Invalid condition: {} format key N/A self N/A add_condition N/A N/A self callbacks_names predicate arguments N/A None None N/A N/A Adds a condition under which a :meth:`do` is called.

        Parameters
        ----------
        callbacks_names : list of str
            The names of the callback in which the method.
        predicate : function
            A predicate function the main loop's log as the
            single parameter and returning ``True`` when the method
            should be called and ``False`` when should not. If ``None``,
            an always ``True`` predicate is used.
        arguments : iterable
            Additional arguments to be passed to :meth:`do`. They will
            be concatenated with the ones passed from the main loop
            (e.g. the batch in case of `after_epoch` callback).

        Returns
        -------
            The extension object (allow chaining calls)

         N/A N/A N/A isinstance callbacks_names N/A list tuple N/A N/A N/A ValueError callbacks_names must be list or tuple. N/A _callback_name callbacks_names N/A N/A N/A arguments N/A N/A arguments N/A N/A N/A predicate N/A N/A N/A N/A N/A self _conditions append N/A _callback_name always_true arguments N/A N/A N/A N/A N/A self _conditions append N/A _callback_name predicate arguments N/A self N/A do N/A N/A self which_callback N/A args N/A N/A Does the job of the training extension.

        Parameters
        ----------
        which_callback : str
            The name of the callback in the context of which :meth:`do` is
            run.
        \*args : tuple
            The arguments from the main loop concatenated with additional
            arguments from user.

        Notes
        -----
        Subclasses *must* accept additional positional arguments in their
        call signature for this method, even if they are unused.

         N/A N/A abstractmethod dispatch N/A N/A self callback_invoked N/A from_main_loop N/A N/A Check conditions and call the :meth:`do` method.

        Also adds additional arguments if specified for a condition.

        .. todo::

            Add a check for a situation when several conditions are met
            at the same time and do something.

         N/A N/A callback_name predicate arguments N/A self _conditions N/A N/A N/A N/A callback_name callback_invoked N/A predicate N/A N/A self main_loop log N/A N/A N/A N/A self do callback_invoked N/A from_main_loop N/A tuple arguments N/A parse_args N/A N/A which_callback args N/A N/A N/A Separates :meth:`do` arguments coming from different sources.

        When a :meth:`do` method receives arguments from both the main
        loop (e.g. a batch) and the user, it often has to separate them.
        This method is the right tool to use.

        Parameters
        ----------
        which_callback : str
            The name of the callback.
        args : iterable
            The arguments.

        Returns
        -------
        from_main_loop : tuple
        from_user : tuple

         N/A args N/A tuple args N/A N/A N/A which_callback after_batch N/A which_callback before_batch N/A N/A N/A N/A N/A args N/A 0 N/A args N/A 1 N/A N/A N/A args N/A staticmethod N/A N/A add_metaclass ABCMeta FinishAfter N/A SimpleExtension N/A N/A Finishes the training process when triggered. __init__ N/A N/A self N/A kwargs N/A N/A N/A N/A N/A super FinishAfter self __init__ kwargs N/A do N/A N/A self which_callback N/A args N/A N/A N/A N/A N/A N/A self main_loop log current_row N/A training_finish_requested True N/A N/A Printing N/A SimpleExtension N/A N/A Prints log messages to the screen. __init__ N/A N/A self N/A kwargs N/A N/A N/A N/A kwargs setdefault before_first_epoch True N/A N/A N/A kwargs setdefault on_resumption True N/A N/A N/A kwargs setdefault after_training True N/A N/A N/A kwargs setdefault after_epoch True N/A N/A N/A kwargs setdefault on_interrupt True N/A N/A N/A N/A super Printing self __init__ kwargs N/A _print_attributes N/A N/A self attribute_tuples N/A N/A N/A N/A attr value N/A sorted N/A N/A attribute_tuples items key first N/A N/A N/A N/A N/A attr startswith _ N/A N/A N/A print N/A N/A {}: format attr value N/A do N/A N/A self which_callback N/A args N/A N/A log N/A N/A self main_loop log N/A print_status True N/A N/A print N/A N/A print N/A N/A join N/A 79 - N/A N/A N/A which_callback before_epoch N/A N/A N/A log status N/A epochs_done 0 N/A N/A N/A print BEFORE FIRST EPOCH N/A N/A N/A which_callback on_resumption N/A N/A N/A print TRAINING HAS BEEN RESUMED N/A N/A N/A which_callback after_training N/A N/A N/A print TRAINING HAS BEEN FINISHED: N/A N/A N/A which_callback after_epoch N/A N/A N/A print AFTER ANOTHER EPOCH N/A N/A N/A which_callback on_interrupt N/A N/A N/A print TRAINING HAS BEEN INTERRUPTED N/A print_status False N/A N/A print N/A N/A join N/A 79 - N/A print_status N/A N/A N/A print Training status: N/A N/A N/A self _print_attributes N/A log status N/A N/A print N/A N/A Log records from the iteration {}: format N/A N/A log status N/A iterations_done N/A N/A N/A self _print_attributes N/A log current_row N/A N/A print N/A N/A ProgressBar N/A TrainingExtension N/A N/A Display a progress bar during training.

    This extension tries to infer the number of iterations per epoch
    by querying the `num_batches`, `num_examples` and `batch_size`
    attributes from the :class:`IterationScheme`. When this information is
    not available it will display a simplified progress bar that does not
    include the estimated time until the end of this epoch.

    Notes
    -----
    This extension should be run before other extensions that print to
    the screen at the end or at the beginning of the epoch (e.g. the
    :class:`Printing` extension). Placing ProgressBar before these
    extension will ensure you won't get intermingled output on your
    terminal.

     __init__ N/A N/A self N/A kwargs N/A N/A N/A N/A N/A super ProgressBar self __init__ kwargs N/A N/A self bar None N/A N/A self iter_count 0 N/A __getstate__ N/A N/A self N/A N/A N/A state N/A dict N/A self __dict__ N/A N/A state N/A bar N/A state N/A __setstate__ N/A N/A self state N/A N/A N/A N/A N/A N/A self __dict__ update state N/A N/A self bar None N/A get_iter_per_epoch N/A N/A self N/A N/A N/A Try to infer the number of iterations per epoch. N/A iter_scheme N/A N/A N/A self main_loop data_stream iteration_scheme N/A N/A hasattr iter_scheme num_batches N/A N/A N/A iter_scheme num_batches N/A N/A N/A N/A hasattr iter_scheme num_examples N/A hasattr iter_scheme batch_size N/A N/A N/A N/A iter_scheme num_examples N/A iter_scheme batch_size N/A None N/A create_bar N/A N/A self N/A N/A N/A Create a new progress bar.

        Calls `self.get_iter_per_epoch()`, selects an appropriate
        set of widgets and creates a ProgressBar.

         N/A iter_per_epoch N/A N/A self get_iter_per_epoch N/A epochs_done N/A N/A N/A N/A self main_loop log status N/A epochs_done N/A N/A iter_per_epoch None N/A N/A widgets N/A N/A N/A Epoch {}, step  format epochs_done N/A N/A progressbar Counter N/A N/A progressbar BouncingBar N/A N/A progressbar Timer N/A iter_per_epoch N/A progressbar UnknownLength N/A N/A widgets N/A N/A N/A Epoch {}, step  format epochs_done N/A N/A progressbar Counter  ( N/A N/A progressbar Percentage )  N/A N/A progressbar Bar N/A N/A progressbar Timer N/A N/A progressbar ETA N/A N/A N/A progressbar ProgressBar widgets widgets max_value iter_per_epoch N/A before_epoch N/A N/A self N/A N/A N/A N/A self iter_count 0 N/A after_epoch N/A N/A self N/A N/A N/A N/A N/A self bar None N/A N/A N/A N/A N/A N/A self bar finish N/A N/A self bar None N/A before_batch N/A N/A self batch N/A N/A N/A N/A N/A self bar None N/A N/A N/A self bar N/A N/A self create_bar N/A N/A N/A N/A self bar start N/A N/A self iter_count 1 N/A N/A N/A N/A self bar update N/A self iter_count N/A N/A Timing N/A SimpleExtension N/A N/A Add timing information to the log.

    This adds data about the time spent in the algorithm's
    :meth:`~.Algorithm.process_batch` method as well as the time spent
    reading data per batch or epoch. It also reports the time spent
    initializing the algorithm.

    Notes
    -----
    Add this extension *before* the :class:`Printing` extension.

    This extension does *not* enable full profiling information. To see a
    full profile of the main loop at the end of training, use the
    ``profile`` configuration (e.g.  by setting ``BLOCKS_PROFILE=true``).

     __init__ N/A N/A self N/A kwargs N/A N/A N/A N/A kwargs setdefault before_first_epoch True N/A N/A N/A kwargs setdefault after_epoch True N/A N/A N/A N/A super Timing self __init__ kwargs N/A N/A self current N/A level N/A train read_data 0 0 N/A level N/A batch epoch N/A N/A self previous N/A level N/A train read_data 0 0 N/A level N/A batch epoch N/A do N/A N/A self which_callback N/A args N/A N/A current_row N/A N/A N/A self main_loop log current_row N/A profile N/A N/A N/A self main_loop profile total N/A N/A which_callback before_epoch N/A N/A N/A current_row N/A time_initialization N/A profile N/A N/A initialization N/A N/A N/A which_callback after_batch N/A N/A level batch N/A N/A N/A which_callback after_epoch N/A N/A level epoch N/A action N/A train read_data N/A N/A N/A N/A N/A self previous N/A level N/A action N/A N/A N/A self current N/A level N/A action N/A N/A N/A N/A self current N/A level N/A action N/A profile N/A N/A training epoch action N/A N/A current_row N/A N/A N/A time_{}_this_{} format action level N/A N/A N/A N/A self current N/A level N/A action N/A N/A N/A self previous N/A level N/A action N/A N/A current_row N/A N/A N/A time_{}_total format action N/A N/A N/A self current N/A level N/A action N/A N/A