reax.Module#
- class reax.Module[source]#
Init function.
Methods
__init__()Init function.
attach(trainer)configure_listeners()Configure model-specific listeners.
configure_model(stage, batch, /)Called at the beginning of each stage.
configure_optimizers()Create the optimizer(s) to use during training.
load_state(state_dict)Load module state from the passed state dictionary
log(name, value, *[, prog_bar, batch_size, ...])Log a key, value pair.
log_dict(dictionary[, prog_bar, logger, ...])Log a dictionary of values at once.
on_before_optimizer_step(optimizer, grad, /)Called before
optimizer.step().on_exception(exception, /)Called when the stage execution is interrupted by an exception.
on_fit_end(stage, /)A fitting stage is about to end.
on_fit_start(stage, /)A fitting stage is about to begin.
on_predict_batch_end(stage, outputs, batch, ...)The predict stage has just finished processing a batch.
on_predict_batch_start(stage, batch, ...)The test stage if about to process a batch.
on_predict_end(stage, /)Prediction is starting.
on_predict_epoch_end(stage, /)A predict epoch is about to end.
on_predict_epoch_start(stage, /)A predict epoch is about to begin.
on_predict_start(stage, /)Prediction is starting.
on_stage_end(stage, /)The stage is ending.
on_stage_iter_ending(stage, step, outputs, /)The stage just finished processing an iteration.
on_stage_iter_starting(stage, step, /)A stage is about to start an interation.
on_stage_start(stage, /)A stage is about to start.
on_test_batch_end(stage, outputs, batch, ...)The test stage has just finished processing a batch.
on_test_batch_start(stage, batch, batch_idx, /)The test stage if about to process a batch.
on_test_end(stage, /)The test stage has finished
on_test_epoch_end(stage, /)A test epoch is about to end.
on_test_epoch_start(stage, /)A test epoch is about to begin.
on_test_start(stage, /)The test stage is starting
on_train_batch_end(stage, outputs, batch, ...)The training stage has just finished processing a batch.
on_train_batch_start(stage, batch, batch_idx, /)The training stage if about to process a batch.
on_train_end(stage, /)Training is about to end.
on_train_epoch_end(stage, /)A training epoch is about to end.
on_train_epoch_start(stage, /)A training epoch is about to begin.
on_train_start(stage, /)Training is about to start.
on_validation_batch_end(stage, outputs, ...)The validation stage has just finished processing a batch.
on_validation_batch_start(stage, batch, ...)The validation stage if about to process a batch.
on_validation_end(stage, /)Validation has ended.
on_validation_epoch_end(stage, /)A validation epoch is about to end.
on_validation_epoch_start(stage, /)A validation epoch is about to begin.
on_validation_start(stage, /)Validation is starting.
optimizers()Optimizers function.
parameters()Parameters function.
predict_dataloader()An iterable or collection of iterables specifying prediction samples.
predict_step(batch, batch_idx, /)Make a model prediction and return the result.
prepare_data()Use this to download and prepare data.
set_parameters(params)Set parameters.
setup(stage, /)Called at the beginning of a trainer stage.
state_dict()Save any additional module state
teardown(stage, /)Called at the end of a trainer stage
test_dataloader()An iterable or collection of iterables specifying test samples.
test_step(batch, batch_idx, /)Test step.
train_dataloader()An iterable or collection of iterables specifying training samples.
training_step(batch, batch_idx, /)Train step.
val_dataloader()An iterable or collection of iterables specifying validation samples.
validation_step(batch, batch_idx, /)Validate step.
Attributes
automatic_optimizationAutomatic optimization.
current_epochGet the current fitting epoch.
global_stepGet the global number of optimizer updates.
global_updatesGet the global number of optimizer updates.
rngsRandom number generators.
trainerTrainer function.
example_input_array