def zeros_initializer(): with tpu.outside_all_rewrites(): return tf.zeros_initializer()
def truncated_normal_initializer(): with tpu.outside_all_rewrites(): return tf.truncated_normal_initializer(stddev=0.1)
def xavier_initializer(): with tpu.outside_all_rewrites(): return tf.contrib.layers.xavier_initializer()
def constant_rating_bias_initializer(): with tpu.outside_all_rewrites(): return tf.constant(RATING_BIAS, dtype=tf.float32)