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

Method optimizer

examples/ResNet/imagenet_utils.py:378–384  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

376 """
377
378 def optimizer(self):
379 lr = tf.get_variable('learning_rate', initializer=0.1, trainable=False)
380 tf.summary.scalar('learning_rate-summary', lr)
381 opt = tf.train.MomentumOptimizer(lr, 0.9, use_nesterov=True)
382 if self.accum_grad != 1:
383 opt = AccumGradOptimizer(opt, self.accum_grad)
384 return opt
385
386 def image_preprocess(self, image):
387 with tf.name_scope('image_preprocess'):

Callers

nothing calls this directly

Calls 2

AccumGradOptimizerClass · 0.90
get_variableMethod · 0.80

Tested by

no test coverage detected