(self)
| 105 | return tf.add_n([wd_cost, cost], name='total_cost') |
| 106 | |
| 107 | def optimizer(self): |
| 108 | lr = tf.train.exponential_decay( |
| 109 | learning_rate=1e-3, |
| 110 | global_step=get_global_step_var(), |
| 111 | decay_steps=468 * 10, |
| 112 | decay_rate=0.3, staircase=True, name='learning_rate') |
| 113 | tf.summary.scalar('lr', lr) |
| 114 | return tf.train.AdamOptimizer(lr) |
| 115 | |
| 116 | |
| 117 | def get_data(): |
nothing calls this directly
no test coverage detected