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

Function PadOrTrimTo

lingvo/core/py_utils.py:4711–4757  ·  view source on GitHub ↗

Pad and slice x to the given shape. Args: x: A tensor. shape: The shape of the returned tensor. pad_val: An int or float used to pad x. pad_after_contents: Whether to pad and trim after the original contents of each dimension. Returns: 'x' is padded with pad_val and s

(x, shape, pad_val=0, pad_after_contents=True)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

ExpandAndPadOrTrimToFunction · 0.85

Calls 2

HasRankFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…