synthval.configs#
Module for defining default parameters for network training and testing using PyTorch and pyNeVer.
This module provides default configurations for setting up neural networks and training them using the PyTorch framework, with an emphasis on integrating with pyNeVer strategies.
- synthval.configs.DEFAULT_NETWORK_PARAMS#
Default parameters for the neural network architecture. The dictionary contains:
- network_idstr
Identifier for the network architecture.
- num_hidden_neuronslist of int
Number of neurons for each hidden layer in the network.
- Type:
dict
- synthval.configs.DEFAULT_TRAINING_PARAMS#
Default parameters for training the network using PyTorch. The dictionary contains:
- optimizer_contorch.optim.Optimizer
Constructor for the optimizer to be used during training.
- opt_paramsdict
Parameters for the optimizer, such as learning rate (lr).
- n_epochsint
Number of epochs for training.
- validation_percentagefloat
Proportion of the data used for validation.
- train_batch_sizeint
Batch size used for training.
- validation_batch_sizeint
Batch size used for validation.
- r_splitbool
Whether to perform a random data split for training/validation.
- scheduler_contorch.optim.lr_scheduler, optional
Constructor for a learning rate scheduler (default is None).
- sch_paramsdict or None
Parameters for the learning rate scheduler (default is None).
- precision_metricpynever.strategies.training.PytorchMetrics
Metric to evaluate training precision, e.g., accuracy or inaccuracy.
- network_transformcallable, optional
Transformation function to apply to the network (default is None).
- devicestr
The device on which the training will be performed (e.g., ‘cpu’ or ‘cuda’).
- train_patienceint
Number of epochs to wait before early stopping if no improvement in validation loss.
- checkpoints_rootstr
Path to the directory where model checkpoints will be saved.
- verbose_rateint
Frequency (in epochs) for printing training progress.
- Type:
dict
- synthval.configs.DEFAULT_TESTING_PARAMS#
Default parameters for testing the trained network. The dictionary contains:
- metricpynever.strategies.training.PytorchMetrics
Metric used to evaluate the model performance on the test set.
- metric_paramsdict
Additional parameters for the testing metric.
- test_batch_sizeint
Batch size for testing.
- devicestr
The device on which testing will be performed (e.g., ‘cpu’ or ‘cuda’).
- Type:
dict