def phi(times, s, tau): # return tf.div(tf.mod(tf.mod(times - s, tau) + tau, tau), tau) return tf.div(tf.mod(times - s, tau), tau)