You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Evaluator is a pure python class, which run neural network in eval mode and get return results and update some stat info
classEvaluator(object):
def__init__(self, option_map, name, ...):
defsetup(self, mi=None, sampler=None):
self.mi=miself.sampler=samplerifself.statsisnotNone:
self.stats.reset()
defepisode_start(self, i):
self.actor_count=0defactor(self, batch):
# get model form self.mi, set volatile=True# forward()# feed_batch() to update self.stats# return reply_msgdefepisode_summary(self, i):
# called after each episode
Trainer
Trainer is also a pure python class wrapped on evaluator.