MCPcopy Create free account
hub / github.com/tensorflow/lingvo / GetShape

Function GetShape

lingvo/core/py_utils.py:433–480  ·  view source on GitHub ↗

Returns tensor's shape as a list which can be unpacked, unlike tf.shape. If the tensor is unranked, and ndims is None, returns the shape as a Tensor. Otherwise, returns a list of values. Each element in the list is an int (when the corresponding dimension is static), or a scalar tf.Tensor (wh

(
    tensor: Any,  # anything that can be converted to a tf.Tensor
    ndims: Optional[int] = None,
    optimize_for_reshape: bool = False,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 15

assert_even_divideFunction · 0.85
HasShapeFunction · 0.85
HasSameShapeFunction · 0.85
GetSizeFunction · 0.85
DeterministicDropoutFunction · 0.85
PadSequenceDimensionFunction · 0.85
PadSequenceToFunction · 0.85
ShiftLeftFunction · 0.85
ExpandToFunction · 0.85
ExpandAndPadOrTrimToFunction · 0.85
CumSumFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…