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

Method optimizer

examples/basics/mnist-convnet.py:83–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81 return total_cost
82
83 def optimizer(self):
84 lr = tf.train.exponential_decay(
85 learning_rate=1e-3,
86 global_step=get_global_step_var(),
87 decay_steps=468 * 10,
88 decay_rate=0.3, staircase=True, name='learning_rate')
89 # This will also put the summary in tensorboard, stat.json and print in terminal,
90 # but this time without moving average
91 tf.summary.scalar('lr', lr)
92 return tf.train.AdamOptimizer(lr)
93
94
95def get_data():

Callers

nothing calls this directly

Calls 1

get_global_step_varFunction · 0.85

Tested by

no test coverage detected