Nabu-asr
Public Member Functions | Public Attributes | List of all members
nabu.neuralnetworks.trainers.trainer.Trainer Class Reference

General class outlining the training environment of a model. More...

Inheritance diagram for nabu.neuralnetworks.trainers.trainer.Trainer:
nabu.neuralnetworks.trainers.standard_trainer.StandardTrainer

Public Member Functions

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...
 

Public Attributes

 conf
 
 dataconf
 
 evaluatorconf
 
 expdir
 
 server
 
 task_index
 
 model
 

Detailed Description

General class outlining the training environment of a model.

Constructor & Destructor Documentation

§ __init__()

def nabu.neuralnetworks.trainers.trainer.Trainer.__init__ (   self,
  conf,
  dataconf,
  modelconf,
  evaluatorconf,
  expdir,
  server,
  task_index 
)

NnetTrainer constructor, creates the training graph.

Parameters
confthe trainer config as a ConfigParser
dataconfthe data configuration as a ConfigParser
modelconfthe neural net model configuration
evaluatorconfthe evaluator configuration for evaluating if None no evaluation will be done
expdirdirectory where the summaries will be written
serveroptional server to be used for distributed training
task_indexoptional index of the worker task in the cluster

Member Function Documentation

§ 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
outputsthe 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
outputsthe 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
testingif true only the graph will be created for debugging
purposes

The documentation for this class was generated from the following file: