neurotorch package¶
Subpackages¶
- neurotorch.callbacks package
- Submodules
- neurotorch.callbacks.base_callback module
BaseCallback
BaseCallback.DEFAULT_HIGH_PRIORITY
BaseCallback.DEFAULT_LOW_PRIORITY
BaseCallback.DEFAULT_MEDIUM_PRIORITY
BaseCallback.DEFAULT_PRIORITY
BaseCallback.UNPICKEABLE_ATTRIBUTES
BaseCallback.__init__()
BaseCallback.close()
BaseCallback.extra_repr()
BaseCallback.get_checkpoint_state()
BaseCallback.instance_counter
BaseCallback.load_checkpoint_state()
BaseCallback.on_batch_begin()
BaseCallback.on_batch_end()
BaseCallback.on_epoch_begin()
BaseCallback.on_epoch_end()
BaseCallback.on_iteration_begin()
BaseCallback.on_iteration_end()
BaseCallback.on_optimization_begin()
BaseCallback.on_optimization_end()
BaseCallback.on_pbar_update()
BaseCallback.on_train_begin()
BaseCallback.on_train_end()
BaseCallback.on_trajectory_end()
BaseCallback.on_validation_batch_begin()
BaseCallback.on_validation_batch_end()
BaseCallback.on_validation_begin()
BaseCallback.on_validation_end()
BaseCallback.start()
CallbacksList
CallbacksList.__init__()
CallbacksList.append()
CallbacksList.close()
CallbacksList.get_checkpoint_state()
CallbacksList.load_checkpoint_state()
CallbacksList.on_batch_begin()
CallbacksList.on_batch_end()
CallbacksList.on_epoch_begin()
CallbacksList.on_epoch_end()
CallbacksList.on_iteration_begin()
CallbacksList.on_iteration_end()
CallbacksList.on_optimization_begin()
CallbacksList.on_optimization_end()
CallbacksList.on_pbar_update()
CallbacksList.on_train_begin()
CallbacksList.on_train_end()
CallbacksList.on_trajectory_end()
CallbacksList.on_validation_batch_begin()
CallbacksList.on_validation_batch_end()
CallbacksList.on_validation_begin()
CallbacksList.on_validation_end()
CallbacksList.remove()
CallbacksList.sort_callbacks_()
CallbacksList.start()
- neurotorch.callbacks.checkpoints_manager module
CheckpointManager
CheckpointManager.CHECKPOINTS_META_SUFFIX
CheckpointManager.CHECKPOINT_BEST_KEY
CheckpointManager.CHECKPOINT_FILE_STRUCT
CheckpointManager.CHECKPOINT_ITRS_KEY
CheckpointManager.CHECKPOINT_ITR_KEY
CheckpointManager.CHECKPOINT_METRICS_KEY
CheckpointManager.CHECKPOINT_OPTIMIZER_STATE_DICT_KEY
CheckpointManager.CHECKPOINT_SAVE_PATH_KEY
CheckpointManager.CHECKPOINT_STATE_DICT_KEY
CheckpointManager.CHECKPOINT_TRAINING_HISTORY_KEY
CheckpointManager.DEFAULT_PRIORITY
CheckpointManager.SAVE_EXT
CheckpointManager.SUFFIX_SEP
CheckpointManager.__init__()
CheckpointManager.checkpoints_meta_path
CheckpointManager.close()
CheckpointManager.extra_repr()
CheckpointManager.get_checkpoint_filename()
CheckpointManager.get_save_name_from_checkpoints()
CheckpointManager.load_checkpoint()
CheckpointManager.load_mode_to_suffix
CheckpointManager.on_iteration_end()
CheckpointManager.save_checkpoint()
CheckpointManager.save_checkpoints_meta()
CheckpointManager.save_on()
CheckpointManager.start()
LoadCheckpointMode
- neurotorch.callbacks.convergence module
- neurotorch.callbacks.early_stopping module
EarlyStopping
EarlyStoppingOnNaN
EarlyStoppingOnStagnation
EarlyStoppingOnTimeLimit
EarlyStoppingOnTimeLimit.CURRENT_SECONDS_COUNT_KEY
EarlyStoppingOnTimeLimit.DELTA_SECONDS_KEY
EarlyStoppingOnTimeLimit.__init__()
EarlyStoppingOnTimeLimit.extra_repr()
EarlyStoppingOnTimeLimit.get_checkpoint_state()
EarlyStoppingOnTimeLimit.load_checkpoint_state()
EarlyStoppingOnTimeLimit.on_iteration_end()
EarlyStoppingOnTimeLimit.start()
EarlyStoppingOnTimeLimit.update_flags()
EarlyStoppingThreshold
- neurotorch.callbacks.events module
- neurotorch.callbacks.history module
TrainingHistory
TrainingHistory.DEFAULT_PRIORITY
TrainingHistory.__init__()
TrainingHistory.append()
TrainingHistory.concat()
TrainingHistory.create_plot()
TrainingHistory.extra_repr()
TrainingHistory.get()
TrainingHistory.get_item_at()
TrainingHistory.insert()
TrainingHistory.items()
TrainingHistory.keys()
TrainingHistory.max()
TrainingHistory.max_item()
TrainingHistory.min()
TrainingHistory.min_item()
TrainingHistory.on_iteration_end()
TrainingHistory.plot()
TrainingHistory.update_fig()
- neurotorch.callbacks.lr_schedulers module
- neurotorch.callbacks.training_visualization module
- Module contents
ForesightTimeStepUpdaterOnTarget
ForesightTimeStepUpdaterOnTarget.DEFAULT_PRIORITY
ForesightTimeStepUpdaterOnTarget.__init__()
ForesightTimeStepUpdaterOnTarget.get_hh_memory_size_from_y_batch()
ForesightTimeStepUpdaterOnTarget.on_batch_begin()
ForesightTimeStepUpdaterOnTarget.on_batch_end()
ForesightTimeStepUpdaterOnTarget.on_train_end()
ForesightTimeStepUpdaterOnTarget.start()
- neurotorch.init package
- neurotorch.learning_algorithms package
- Submodules
- neurotorch.learning_algorithms.bptt module
BPTT
BPTT.CHECKPOINT_OPTIMIZER_STATE_DICT_KEY
BPTT.DEFAULT_OPTIMIZER_CLS
BPTT.OPTIMIZER_PARAMS_GROUP_IDX
BPTT.__init__()
BPTT.apply_criterion()
BPTT.create_default_optimizer()
BPTT.extra_repr()
BPTT.get_checkpoint_state()
BPTT.initialize_param_groups()
BPTT.load_checkpoint_state()
BPTT.on_optimization_begin()
BPTT.on_optimization_end()
BPTT.on_validation_batch_begin()
BPTT.start()
- neurotorch.learning_algorithms.eprop module
Eprop
Eprop.CHECKPOINT_FEEDBACK_WEIGHTS_KEY
Eprop.CHECKPOINT_OPTIMIZER_STATE_DICT_KEY
Eprop.DEFAULT_FEEDBACKS_GEN_STRATEGY
Eprop.DEFAULT_FEEDBACKS_STR_NORM_CLIP_VALUE
Eprop.DEFAULT_OPTIMIZER_CLS
Eprop.DEFAULT_Y_KEY
Eprop.FEEDBACKS_GEN_FUNCS
Eprop.OPTIMIZER_OUTPUT_PARAMS_GROUP_IDX
Eprop.OPTIMIZER_PARAMS_GROUP_IDX
Eprop.__init__()
Eprop.compute_errors()
Eprop.compute_learning_signals()
Eprop.decorate_forwards()
Eprop.eligibility_traces_zeros_()
Eprop.get_checkpoint_state()
Eprop.initialize_feedback_weights()
Eprop.initialize_layers()
Eprop.initialize_output_layers()
Eprop.initialize_output_params()
Eprop.initialize_param_groups()
Eprop.initialize_params()
Eprop.load_checkpoint_state()
Eprop.make_feedback_weights()
Eprop.on_batch_begin()
Eprop.on_batch_end()
Eprop.start()
Eprop.update_grads()
- neurotorch.learning_algorithms.learning_algorithm module
- neurotorch.learning_algorithms.rls module
RLS
RLS.CHECKPOINT_OPTIMIZER_STATE_DICT_KEY
RLS.CHECKPOINT_P_STATES_DICT_KEY
RLS.__init__()
RLS.get_checkpoint_state()
RLS.grad_mth_step()
RLS.initialize_P_list()
RLS.inputs_mth_step()
RLS.jacobian_mth_step()
RLS.load_checkpoint_state()
RLS.on_batch_begin()
RLS.on_batch_end()
RLS.on_optimization_begin()
RLS.optimization_step()
RLS.outputs_mth_step()
RLS.scaled_jacobian_mth_step()
RLS.start()
- neurotorch.learning_algorithms.tbptt module
- Module contents
- neurotorch.metrics package
- Submodules
- neurotorch.metrics.base module
- neurotorch.metrics.classification module
ClassificationMetrics
ClassificationMetrics.__call__()
ClassificationMetrics.accuracy()
ClassificationMetrics.auc()
ClassificationMetrics.compute_y_true_y_pred()
ClassificationMetrics.confusion_matrix()
ClassificationMetrics.f1()
ClassificationMetrics.get_all_metrics_names_to_func()
ClassificationMetrics.precision()
ClassificationMetrics.recall()
- neurotorch.metrics.losses module
- neurotorch.metrics.regression module
RegressionMetrics
RegressionMetrics.EPSILON
RegressionMetrics.__call__()
RegressionMetrics.compute_p_var()
RegressionMetrics.compute_y_true_y_pred()
RegressionMetrics.d2_tweedie()
RegressionMetrics.get_all_metrics_names_to_func()
RegressionMetrics.mean_absolute_error()
RegressionMetrics.mean_squared_error()
RegressionMetrics.p_var()
RegressionMetrics.r2()
- Module contents
- neurotorch.modules package
- Subpackages
- Submodules
- neurotorch.modules.base module
BaseModel
BaseModel.__call__()
BaseModel.__init__()
BaseModel.apply_input_transform()
BaseModel.apply_output_transform()
BaseModel.build()
BaseModel.checkpoints_meta_path
BaseModel.device
BaseModel.forward()
BaseModel.get_default_input_transform()
BaseModel.get_default_output_transform()
BaseModel.get_prediction_log_proba()
BaseModel.get_prediction_proba()
BaseModel.get_prediction_trace()
BaseModel.get_raw_prediction()
BaseModel.hard_update()
BaseModel.infer_sizes_from_inputs()
BaseModel.input_sizes
BaseModel.is_built
BaseModel.load_checkpoint()
BaseModel.output_sizes
BaseModel.soft_update()
BaseModel.to()
BaseModel.to_onnx()
BaseModel.training
NamedModule
SizedModule
- neurotorch.modules.functions module
- neurotorch.modules.sequential module
Sequential
Sequential.__init__()
Sequential.build()
Sequential.build_layers()
Sequential.device
Sequential.forward()
Sequential.get_all_layers()
Sequential.get_all_layers_names()
Sequential.get_and_reset_regularization_loss()
Sequential.get_dict_of_layers()
Sequential.get_layer()
Sequential.get_layers()
Sequential.get_prediction_log_proba()
Sequential.get_prediction_proba()
Sequential.get_raw_prediction()
Sequential.infer_sizes_from_inputs()
Sequential.initialize_weights_()
Sequential.input_transform
Sequential.output_transform
Sequential.training
- neurotorch.modules.sequential_rnn module
SequentialRNN
SequentialRNN.__init__()
SequentialRNN.build()
SequentialRNN.forward()
SequentialRNN.get_and_reset_regularization_loss()
SequentialRNN.get_fmt_prediction()
SequentialRNN.get_last_prediction()
SequentialRNN.get_max_prediction()
SequentialRNN.get_mean_prediction()
SequentialRNN.get_prediction_log_proba()
SequentialRNN.get_prediction_proba()
SequentialRNN.get_prediction_trace()
SequentialRNN.get_raw_prediction()
SequentialRNN.hh_memory_size
SequentialRNN.input_transform
SequentialRNN.out_memory_size
SequentialRNN.output_transform
SequentialRNN.training
- neurotorch.modules.spike_funcs module
- neurotorch.modules.utils module
- neurotorch.modules.wrappers module
- Module contents
- neurotorch.regularization package
- neurotorch.rl package
- neurotorch.trainers package
- Submodules
- neurotorch.trainers.classification module
- neurotorch.trainers.regression module
- neurotorch.trainers.trainer module
CurrentTrainingState
CurrentTrainingState.batch
CurrentTrainingState.batch_is_train
CurrentTrainingState.batch_loss
CurrentTrainingState.epoch
CurrentTrainingState.epoch_loss
CurrentTrainingState.get_null_state()
CurrentTrainingState.info
CurrentTrainingState.iteration
CurrentTrainingState.itr_metrics
CurrentTrainingState.n_epochs
CurrentTrainingState.n_iterations
CurrentTrainingState.objects
CurrentTrainingState.pred_batch
CurrentTrainingState.stop_training_flag
CurrentTrainingState.train_loss
CurrentTrainingState.train_metrics
CurrentTrainingState.update()
CurrentTrainingState.val_loss
CurrentTrainingState.val_metrics
CurrentTrainingState.x_batch
CurrentTrainingState.y_batch
Trainer
Trainer.__init__()
Trainer.apply_criterion_on_batch()
Trainer.checkpoint_managers
Trainer.force_overwrite
Trainer.get_pred_batch()
Trainer.learning_algorithms
Trainer.load_checkpoint_mode
Trainer.load_state()
Trainer.network
Trainer.sort_callbacks_()
Trainer.state
Trainer.train()
Trainer.training_histories
Trainer.update_info_state_()
Trainer.update_itr_metrics_state_()
Trainer.update_objects_state_()
Trainer.update_state_()
TrainingState
- Module contents
- neurotorch.transforms package
- Submodules
- neurotorch.transforms.base module
- neurotorch.transforms.spikes_auto_encoder module
SpikesAutoEncoder
SpikesAutoEncoder.__init__()
SpikesAutoEncoder.decode()
SpikesAutoEncoder.device
SpikesAutoEncoder.encode()
SpikesAutoEncoder.forward()
SpikesAutoEncoder.get_and_reset_regularization_loss()
SpikesAutoEncoder.get_prediction_trace()
SpikesAutoEncoder.get_raw_prediction()
SpikesAutoEncoder.input_transform
SpikesAutoEncoder.output_transform
SpikesAutoEncoder.training
- neurotorch.transforms.spikes_decoders module
- neurotorch.transforms.spikes_encoders module
- neurotorch.transforms.vision module
- neurotorch.transforms.wrappers module
- Module contents
- neurotorch.utils package
- neurotorch.visualisation package
Submodules¶
neurotorch.dimension module¶
- class neurotorch.dimension.Dimension(size: int | None = None, dtype: DimensionProperty = DimensionProperty.NONE, name: str | None = None)¶
Bases:
object
This object is used to represent a dimension.
- size¶
The size of the dimension.
- Type:
int
- dtype¶
The type of the dimension.
- Type:
- name¶
The name of the dimension.
- Type:
str
- __init__(size: int | None = None, dtype: DimensionProperty = DimensionProperty.NONE, name: str | None = None)¶
Constructor for Dimension.
- Parameters:
size (int) – The size of the dimension.
dtype (DimensionProperty) – The type of the dimension.
name (str) – The name of the dimension.
- static from_int(size: int | None) Dimension ¶
Create a Dimension from an integer.
- Parameters:
size (int) – The size of the dimension.
- Returns:
A dimension with the given size and None as dtype.
- Return type:
- static from_int_or_dimension(dimension: int | Dimension | None) Dimension ¶
Create a Dimension from an integer or a Dimension.
- Parameters:
dimension (int or Dimension) – The dimension to convert.
- Returns:
A dimension with the given size and None as dtype if the input is an integer and the given dimension
if it is a Dimension. :rtype: Dimension
- class neurotorch.dimension.DimensionProperty(value)¶
Bases:
Enum
Enum for dimension properties.
NONE: No dimension property. This type of dimension can be used for features, neurons, unknown, etc. TIME: Time dimension. This type of dimension can be used for time series. SPATIAL: Spatial dimension. This type of dimension can be used for spatial data like images, videos, etc.
- NONE = 0¶
- SPATIAL = 2¶
- TIME = 1¶
Module contents¶
NeuroTorch: A Python library for machine learning and neuroscience.