MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / tile_one_dimension

Function tile_one_dimension

tensorflow/python/ops/array_ops.py:4960–4970  ·  view source on GitHub ↗

Tiles a single dimension of a tensor.

(data, axis, multiple)

Source from the content-addressed store, hash-verified

4958
4959
4960def tile_one_dimension(data, axis, multiple):
4961 """Tiles a single dimension of a tensor."""
4962 # Assumes axis is a nonnegative int.
4963 if data.shape.ndims is not None:
4964 multiples = [1] * data.shape.ndims
4965 multiples[axis] = multiple
4966 else:
4967 ones_value = ones(rank(data), dtypes.int32)
4968 multiples = concat([ones_value[:axis], [multiple], ones_value[axis + 1:]],
4969 axis=0)
4970 return tile(data, multiples)
4971
4972
4973def _with_nonzero_rank(data):

Callers 1

repeat_with_axisFunction · 0.85

Calls 4

onesFunction · 0.70
rankFunction · 0.70
concatFunction · 0.70
tileFunction · 0.50

Tested by

no test coverage detected