Skip to content

Instantly share code, notes, and snippets.

@PratyushTripathy
Last active March 7, 2020 07:08
Show Gist options
  • Save PratyushTripathy/52276f0d50fcad9e61dff669f54bb8a1 to your computer and use it in GitHub Desktop.
Save PratyushTripathy/52276f0d50fcad9e61dff669f54bb8a1 to your computer and use it in GitHub Desktop.
import tensorflow as tf
# Normalise the features
features = features / 255.0
print('New values in input features, min: %d & max: %d' % (features.min(), features.max()))
# Transpose the features to channel last format
features = tf.transpose(features, [0, 2, 3, 1])
print('Reshaped features:', features.shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment