niftynet.engine.application_iteration module¶
Message stores status info of the current iteration.
-
class
IterationMessage
[source]¶ Bases:
object
This class consists of network variables and operations at each iteration. A singleton instance is managed by the application engine and an application jointly.
-
current_iter
¶ Current iteration index can be used to create complex schedule for the iterative training/validation/inference procedure.
Returns: integer of iteration
-
ops_to_run
¶ operations (tf graph elements) to be fed into
session.run(...)
. This is currently mainly used for passing network gradient updates ops to session.runReturns: dictionary of operations
-
data_feed_dict
¶ A dictionary that maps graph elements to values to be fed into
session.run(...)
as feed_dict parameterReturns: dictionary of operations
-
current_iter_output
¶ This property stores graph output received by running
session.run()
.Returns:
-
should_stop
¶ Engine check this property after each iteration
This could be modified in by application
application.set_iteration_update()
to create training schedules such as early stopping.Returns: boolean
-
phase
¶ A string indicating the phase in train/validation/inference
Returns:
-
is_training
¶ return – boolean value indicating if the phase is in training
-
__init__
¶ x.__init__(…) initializes x; see help(type(x)) for signature
-
is_validation
¶ return – boolean value indicating if the phase is validation
-
is_inference
¶ return – boolean value indicating if the phase is inference
-
iter_duration
¶ return – time duration of an iteration
-