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

Function fix_image_flip_shape

tensorflow/python/ops/image_ops_impl.py:307–323  ·  view source on GitHub ↗

Set the shape to 3 dimensional if we don't know anything else. Args: image: original image size result: flipped or transformed image Returns: An image whose shape is at least None,None,None.

(image, result)

Source from the content-addressed store, hash-verified

305
306
307def fix_image_flip_shape(image, result):
308 """Set the shape to 3 dimensional if we don't know anything else.
309
310 Args:
311 image: original image size
312 result: flipped or transformed image
313
314 Returns:
315 An image whose shape is at least None,None,None.
316 """
317
318 image_shape = image.get_shape()
319 if image_shape == tensor_shape.unknown_shape():
320 result.set_shape([None, None, None])
321 else:
322 result.set_shape(image_shape)
323 return result
324
325
326@tf_export('image.random_flip_up_down')

Callers 2

_random_flipFunction · 0.85
_flipFunction · 0.85

Calls 3

unknown_shapeMethod · 0.80
get_shapeMethod · 0.45
set_shapeMethod · 0.45

Tested by

no test coverage detected