text_plain_output_1.png
import keras

import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

train_df = pd.read_csv('../input/fashion-mnist_train.csv')

batch_size = 128
num_classes = 10
epochs = 10
img_rows, img_cols = (28, 28)
y_train = keras.utils.to_categorical(train_df.label.values, num_classes)
print('y_train: ', y_train.shape)
x_train = np.array([row.reshape((img_rows, img_cols, 1)) for row in train_df.drop('label', axis=1, inplace=False).values])
print('x_train: ', x_train.shape)