Skip to content

Instantly share code, notes, and snippets.

@amankharwal

amankharwal/sign language.py Secret

Created Dec 5, 2020
Embed
What would you like to do?
# In this section you will have to add another dimension to the data
# So, for example, if your array is (10000, 28, 28)
# You will need to make it (10000, 28, 28, 1)
#training_images = np.expand_dims(training_images, axis=3)
#testing_images = np.expand_dims(testing_images, axis=3)
training_images = data_train.iloc[:,1:].values
training_labels = data_train.iloc[:,0].values
testing_images = data_test.iloc[:,1:].values
testing_labels = data_test.iloc[:,0].values
training_images = training_images.reshape(-1,28,28,1)
testing_images = testing_images.reshape(-1,28,28,1)
print(training_images.shape)
print(training_labels.shape)
print(testing_images.shape)
print(testing_labels.shape)
# Their output should be:
# (27455, 28, 28, 1)
# (27455,)
# (7172, 28, 28, 1)
# (7172,)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment