def multivariate_rbf(x, y=0.0, sigma=1.0, l=1.0):
 x = tf.convert_to_tensor(x)
 y = tf.convert_to_tensor(y)
 sigma = tf.convert_to_tensor(sigma)
 l = tf.convert_to_tensor(l)
 dependencies = [tf.verify_tensor_all_finite(x, msg=''), tf.verify_tensor_all_finite(y, msg=''), tf.assert_positive(sigma), tf.assert_positive(l)]
 x = control_flow_ops.with_dependencies(dependencies, x)
 y = control_flow_ops.with_dependencies(dependencies, y)
 sigma = control_flow_ops.with_dependencies(dependencies, sigma)
 l = control_flow_ops.with_dependencies(dependencies, l)
 return (tf.pow(sigma, 2.0) * tf.exp((((-1.0) / (2.0 * tf.pow(l, 2.0))) * tf.reduce_sum(tf.pow((x - y), 2.0)))))

def multivariate_rbf ( x , y = 0.0 , sigma = 1.0 , l = 1.0 ) : x = tf . convert_to_tensor ( x ) y = tf . convert_to_tensor ( y ) sigma = tf . convert_to_tensor ( sigma ) l = tf . convert_to_tensor ( l ) dependencies = [ tf . verify_tensor_all_finite ( x , msg = '' ) , tf . verify_tensor_all_finite ( y , msg = '' ) , tf . assert_positive ( sigma ) , tf . assert_positive ( l ) ] x = control_flow_ops . with_dependencies ( dependencies , x ) y = control_flow_ops . with_dependencies ( dependencies , y ) sigma = control_flow_ops . with_dependencies ( dependencies , sigma ) l = control_flow_ops . with_dependencies ( dependencies , l ) return ( tf . pow ( sigma , 2.0 ) * tf . exp ( ( ( ( - 1.0 ) / ( 2.0 * tf . pow ( l , 2.0 ) ) ) * tf . reduce_sum ( tf . pow ( ( x - y ) , 2.0 ) ) ) ) )
squared-exponential kernel .