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

Function _get_dim

tensorflow/python/ops/image_ops_impl.py:666–670  ·  view source on GitHub ↗
(tensor, idx)

Source from the content-addressed store, hash-verified

664 # Helper method to return the `idx`-th dimension of `tensor`, along with
665 # a boolean signifying if the dimension is dynamic.
666 def _get_dim(tensor, idx):
667 static_shape = tensor.get_shape().dims[idx].value
668 if static_shape is not None:
669 return static_shape, False
670 return array_ops.shape(tensor)[idx], True
671
672 # Get the height, width, depth (and batch size, if the image is a 4-D
673 # tensor).

Callers 1

central_cropFunction · 0.70

Calls 2

get_shapeMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected