tf.contrib.util.constant_value(tensor)
Returns the constant value of the given tensor, if efficiently calculable.
This function attempts to partially evaluate the given tensor, and returns its value as a numpy ndarray if this succeeds.
TODO(mrry): Consider whether this function should use a registration mechanism like gradients and ShapeFunctions, so that it is easily extensible.
NOTE: If constant_value(tensor) returns a non-None result, it will no longer be possible to feed a different value