MCPcopy Create free account
hub / github.com/alibaba/nann / constant_value

Function constant_value

tensorflow/tensorflow/python/framework/tensor_util.py:768–802  ·  view source on GitHub ↗

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. Compatibility(V1): If `constant_value(tensor)` returns a non-`None` result, it will no longer

(tensor, partial=False)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

_ConstantValueFunction · 0.70
constant_value_as_shapeFunction · 0.70

Calls 4

_ConstantValueFunction · 0.85
prevent_feedingMethod · 0.80
is_tensorFunction · 0.70
numpyMethod · 0.45

Tested by

no test coverage detected