October 2018
Intermediate to advanced
472 pages
10h 57m
English
Reshape the original dataset and the noised dataset to a shape of 60000*28*28*1. This is important since the 2D convolutions expect to receive images of a shape of 28*28*1:
# Reshaping the training dataX_train = X_train.reshape(X_train.shape[0], X_train.shape[1], X_train.shape[2], 1)print('Size/Shape of the original training set: ', X_train.shape)# Reshaping the noised training datanoised_train_data = noised_train_data.reshape(noised_train_data.shape[0], noised_train_data.shape[1], noised_train_data.shape[2], 1)print('Size/Shape of the noised training set: ', noised_train_data.shape)# Reshaping the testing dataX_test = X_test.reshape(X_test.shape[0], X_test.shape[1], X_test.shape[2], 1)print('Size/Shape of the original test set: ...Read now
Unlock full access