General class outlining the training environment of a model.
More...
|
| def | __init__ (self, conf, dataconf, modelconf, evaluatorconf, expdir, server, task_index) |
| | NnetTrainer constructor, creates the training graph. More...
|
| |
| def | train (self, testing=False) |
| | train the model More...
|
| |
| def | chief_only_hooks (self, outputs) |
| | add hooks only for the chief worker More...
|
| |
| def | hooks (self, outputs) |
| | add hooks for the session More...
|
| |
| def | aditional_loss (self) |
| | add an aditional loss More...
|
| |
|
|
| conf |
| |
|
| dataconf |
| |
|
| evaluatorconf |
| |
|
| expdir |
| |
|
| server |
| |
|
| task_index |
| |
|
| model |
| |
General class outlining the training environment of a model.
§ __init__()
| def nabu.neuralnetworks.trainers.trainer.Trainer.__init__ |
( |
|
self, |
|
|
|
conf, |
|
|
|
dataconf, |
|
|
|
modelconf, |
|
|
|
evaluatorconf, |
|
|
|
expdir, |
|
|
|
server, |
|
|
|
task_index |
|
) |
| |
NnetTrainer constructor, creates the training graph.
- Parameters
-
| conf | the trainer config as a ConfigParser |
| dataconf | the data configuration as a ConfigParser |
| modelconf | the neural net model configuration |
| evaluatorconf | the evaluator configuration for evaluating if None no evaluation will be done |
| expdir | directory where the summaries will be written |
| server | optional server to be used for distributed training |
| task_index | optional index of the worker task in the cluster |
§ aditional_loss()
| def nabu.neuralnetworks.trainers.trainer.Trainer.aditional_loss |
( |
|
self | ) |
|
add an aditional loss
- Returns
- the aditional loss or None
§ chief_only_hooks()
| def nabu.neuralnetworks.trainers.trainer.Trainer.chief_only_hooks |
( |
|
self, |
|
|
|
outputs |
|
) |
| |
add hooks only for the chief worker
- Parameters
-
| outputs | the outputs generated by the create graph method |
- Returns
- a list of hooks
§ hooks()
| def nabu.neuralnetworks.trainers.trainer.Trainer.hooks |
( |
|
self, |
|
|
|
outputs |
|
) |
| |
add hooks for the session
- Parameters
-
| outputs | the outputs generated by the create graph method |
- Returns
- a list of hooks
§ train()
| def nabu.neuralnetworks.trainers.trainer.Trainer.train |
( |
|
self, |
|
|
|
testing = False |
|
) |
| |
train the model
- Parameters
-
| testing | if true only the graph will be created for debugging |
| purposes | |
The documentation for this class was generated from the following file: