Base Trainer
BaseBayesTrainer
Bases: Generic[ModelT], ABC
Abstcract trainer class that is used to provide simple interface to train bayesian modules. Could be used to create your trainers.
Source code in src/methods/bayes/base/trainer.py
eval_dataset = eval_dataset
instance-attribute
Dataset on which epoch of training model should be evaluated
params = params
instance-attribute
Storing any trianing params that is used to fine-tune training
report_chain = report_chain
instance-attribute
All callback that should be return by each epoch
train_dataset = train_dataset
instance-attribute
Dataset on which model should be trained
__init__(params, report_chain, train_dataset, eval_dataset)
summary
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
TrainerParams
|
trianing params that is used to fine-tune training |
required |
report_chain
|
Optional[ReportChain]
|
All callback that should be return by each epoch |
required |
train_dataset
|
Iterable
|
Dataset on which model should be trained |
required |
eval_dataset
|
Iterable
|
Dataset on which epoch of training model should be evaluated |
required |
Source code in src/methods/bayes/base/trainer.py
train(*args, **kwargs)
abstractmethod
It simply train provided model with tarin parameters that is stores in params
Returns:
| Name | Type | Description |
|---|---|---|
BaseNetDistribution |
BaseNetDistribution
|
Distribution of nets that could be used |
BaseNetDistribution
|
to sample models or getting map estimation (the most probable) by result of train. |