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

Function HasShape

lingvo/core/py_utils.py:483–575  ·  view source on GitHub ↗

Syntactic sugar for asserting that tensor has the expected shape. Args: tensor: A Tensor. expected_shape: A Python list or a 1D tensor. Elements of expected_shape can be -1 which indicate that any size is valid for that dimension. ndims: If not None, check only the first `ndims`

(tensor: tf.Tensor, expected_shape, ndims=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 5

assert_even_divideFunction · 0.85
HasSameShapeFunction · 0.85
PadSequenceToFunction · 0.85
MultiTaskProjectionFunction · 0.85

Calls 2

GetShapeFunction · 0.85
with_dependenciesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…