Skip to content

Instantly share code, notes, and snippets.

@PratyushTripathy
Last active September 3, 2019 11:17
Show Gist options
  • Save PratyushTripathy/7fcb68a3ba1d66d2eca07c4fb6696a18 to your computer and use it in GitHub Desktop.
Save PratyushTripathy/7fcb68a3ba1d66d2eca07c4fb6696a18 to your computer and use it in GitHub Desktop.
# Normalise the data
xTrain = xTrain / 255.0
xTest = xTest / 255.0
featuresHyderabad = featuresHyderabad / 255.0
# Reshape the data
xTrain = xTrain.reshape((xTrain.shape[0], 1, xTrain.shape[1]))
xTest = xTest.reshape((xTest.shape[0], 1, xTest.shape[1]))
featuresHyderabad = featuresHyderabad.reshape((featuresHyderabad.shape[0], 1, featuresHyderabad.shape[1]))
# Print the shape of reshaped data
print(xTrain.shape, xTest.shape, featuresHyderabad.shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment