MCPcopy Create free account
hub / github.com/UCSC-VLAA/OpenVision / wrap

Function wrap

src/transforms/autoaugment.py:411–416  ·  view source on GitHub ↗

Returns 'image' with an extra channel set to all 1s.

(image)

Source from the content-addressed store, hash-verified

409
410
411def wrap(image):
412 """Returns 'image' with an extra channel set to all 1s."""
413 shape = tf.shape(image)
414 extended_channel = tf.ones([shape[0], shape[1], 1], image.dtype)
415 extended = tf.concat([image, extended_channel], 2)
416 return extended
417
418
419def unwrap(image, replace):

Callers 5

rotateFunction · 0.85
translate_xFunction · 0.85
translate_yFunction · 0.85
shear_xFunction · 0.85
shear_yFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected