The specified code block generates a TensorFlow graph to “normalize” the image so that the image can be fed to another TensorFlow graph (start). Python achieves the equivalent of something like this:
image = tf.cast(tf.image.decode_jpeg(input, channels = 3), tf.float32)
batch = tf.expand_dims(image, 0);
resized = tf.image.resize_bilinear(dims_expander, [input_height, input_width])
normalized = tf.divide(tf.subtract(resized, [input_mean]), [input_std])
Python TensorFlow (, tf.cast, tf.image.decode_jpeg ..) ops TensorFlow. Java API, , GraphBuilder.
, .
, , .