MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / SimpleTrainer

Class SimpleTrainer

tensorpack/train/trainers.py:43–53  ·  view source on GitHub ↗

Single-GPU single-cost single-tower trainer.

Source from the content-addressed store, hash-verified

41
42
43class SimpleTrainer(SingleCostTrainer):
44 """
45 Single-GPU single-cost single-tower trainer.
46 """
47 def _setup_graph(self, input, get_cost_fn, get_opt_fn):
48 logger.info("Building graph for a single training tower ...")
49 with TrainTowerContext(''):
50 grads = self._make_get_grad_fn(input, get_cost_fn, get_opt_fn)()
51 opt = get_opt_fn()
52 self.train_op = opt.apply_gradients(grads, name='train_op')
53 return []
54
55
56class NoOpTrainer(SimpleTrainer):

Callers 15

__init__Method · 0.85
boilerplate.pyFile · 0.85
trainFunction · 0.85
char-rnn.pyFile · 0.85
PTB-LSTM.pyFile · 0.85
train-timit.pyFile · 0.85
DQN.pyFile · 0.85
mnist-tflayers.pyFile · 0.85
export-model.pyFile · 0.85
cifar-convnet.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected