Created
August 16, 2017 13:32
-
-
Save boaerosuke/eb8a12d8d2f0a75ab26d650bba184e8c to your computer and use it in GitHub Desktop.
Tweak the code that it only sets up channels last
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if K.image_data_format() == 'channels_first': | |
# x_train = x_train.reshape(x_train.shape[0], 1, img_rows, img_cols) | |
# x_test = x_test.reshape(x_test.shape[0], 1, img_rows, img_cols) | |
# input_shape = (1, img_rows, img_cols) | |
#changed this to be always channels_last! | |
x_train = x_train.reshape(x_train.shape[0], img_rows, img_cols, 1) | |
x_test = x_test.reshape(x_test.shape[0], img_rows, img_cols, 1) | |
input_shape = (img_rows, img_cols, 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment