Closed benjamin-dupuis closed 5 years ago
The function clipped_error is not correctly written. Indeed, the try and except parts are the same ! Currently, it is written as :
def clipped_error(x): try: return tf.select(tf.abs(x) < 1.0, 0.5 tf.square(x), tf.abs(x) - 0.5) except: return tf.where(tf.abs(x) < 1.0, 0.5 tf.square(x), tf.abs(x) - 0.5)
The function should be
def clipped_error(x): return tf.where(tf.abs(x) < 1.0, 0.5 * tf.square(x), tf.abs(x) - 0.5)
The function clipped_error is not correctly written. Indeed, the try and except parts are the same ! Currently, it is written as :
def clipped_error(x): try: return tf.select(tf.abs(x) < 1.0, 0.5 tf.square(x), tf.abs(x) - 0.5) except: return tf.where(tf.abs(x) < 1.0, 0.5 tf.square(x), tf.abs(x) - 0.5)
The function should be
def clipped_error(x): return tf.where(tf.abs(x) < 1.0, 0.5 * tf.square(x), tf.abs(x) - 0.5)