def _ImageProcessing(image_buffer, shape):
 image = tf.image.decode_png(image_buffer, channels=shape.depth)
 image.set_shape([shape.height, shape.width, shape.depth])
 image = tf.cast(image, tf.float32)
 image = tf.sub(image, 128.0)
 image = tf.mul(image, (1 / 100.0))
 return image

def _ImageProcessing ( image_buffer , shape ) : image = tf . image . decode_png ( image_buffer , channels = shape . depth ) image . set_shape ( [ shape . height , shape . width , shape . depth ] ) image = tf . cast ( image , tf . float32 ) image = tf . sub ( image , 128.0 ) image = tf . mul ( image , ( 1 / 100.0 ) ) return image
convert a png string into an input tensor .