import tensorflow as tf

            return tf.matmul(hidden, w)

    def build_loss(self):
        cutoff_vf_manager = tf.reshape(tf.stop_gradient(self.manager_vf), [-1])
        dot = tf.reduce_sum(tf.multiply(self.s_diff, self.g), axis=1)
        gcut = tf.stop_gradient(self.g)
        mag = tf.norm(self.s_diff, axis=1) * tf.norm(gcut, axis=1) + .0001
        dcos = dot / mag
        manager_loss = -tf.reduce_sum((self.r - cutoff_vf_manager) * dcos)

