CudaCallback#
- class radionets.core.callbacks.CudaCallback(*, after_create=None, before_fit=None, before_epoch=None, before_train=None, before_batch=None, after_pred=None, after_loss=None, before_backward=None, after_cancel_backward=None, after_backward=None, before_step=None, after_cancel_step=None, after_step=None, after_cancel_batch=None, after_batch=None, after_cancel_train=None, after_train=None, before_validate=None, after_cancel_validate=None, after_validate=None, after_cancel_epoch=None, after_epoch=None, after_cancel_fit=None, after_fit=None)[source]#
Bases:
CallbackCallback to move model to CUDA device before training.
Simple callback that ensures the model is moved to the GPU before the training loop.
- Attributes:
- _orderint
Callback execution order (3).
Attributes Summary
Name of the Callback, camel-cased and with 'Callback' removed
Methods Summary
__call__(event_name)Call self.{event_name} if it's defined
Attributes Documentation
- learn = None#
- name#
Name of the Callback, camel-cased and with ‘Callback’ removed
- order = 0#
- run = True#
- run_train = True#
- run_valid = True#
Methods Documentation
- __call__(event_name)#
Call self.{event_name} if it’s defined