niftynet.engine.handler_gradient module
This module implements a network model updater with gradient ops.
-
class
ApplyGradients(is_training_action=False, **_unused)[source]
Bases: object
This class handles iteration events to update the model with gradient op
(by setting iteration message with a ‘gradients’ op at the beginning of
each iteration).
-
make_gradients_op(sender, **_unused)[source]
Making optimiser.apply_gradients ops.
| Parameters: |
- sender – a niftynet.application instance
- _unused –
|
| Returns: |
|
-
add_gradients(sender, **msg)[source]
Event handler to add gradients to iteration message ops_to_run.
See also
niftynet.application.base_application.set_network_gradient_op
| Parameters: |
- sender – a niftynet.application instance
- msg – an iteration message instance
|
| Returns: |
|