'Create the optimizer node of the graph.'

def _create_optimizer_node(self):

    self.lr_var = tf.Variable(0.0, trainable=False)
    tvars = tf.trainable_variables()
    (grads, _) = tf.clip_by_global_norm(tf.gradients(self.cost, tvars), self.max_grad_norm)
    optimizer = tf.train.GradientDescentOptimizer(self.lr_var)
    self._train_op = optimizer.apply_gradients(zip(grads, tvars))
