def gradients(loss, variables):
 return tf.gradients(loss, variables, colocate_gradients_with_ops=True)

def gradients ( loss , variables ) : return tf . gradients ( loss , variables , colocate_gradients_with_ops = True )
returns the gradients of variables with regard to loss .