def __call__(self, step):
    if tf.executing_eagerly():
        return self._get_learning_rate(step)
    graph = tf.compat.v1.get_default_graph()
    if (graph not in self.learning_rate_ops_cache):
        if self.compute_lr_on_cpu:
            with tf.device('/device:CPU:0'):
                self.learning_rate_ops_cache[graph] = self._get_learning_rate(step)
        else:
            self.learning_rate_ops_cache[graph] = self._get_learning_rate(step)
    return self.learning_rate_ops_cache[graph]
def __call__(self, step):
    if tf.executing_eagerly():
        return self._get_learning_rate(step)
    graph = tf.compat.v1.get_default_graph()
    if (graph not in self.learning_rate_ops_cache):
        if self.compute_lr_on_cpu:
            with tf.device('/device:CPU:0'):
                self.learning_rate_ops_cache[graph] = self._get_learning_rate(step)
        else:
            self.learning_rate_ops_cache[graph] = self._get_learning_rate(step)
    return self.learning_rate_ops_cache[graph]