image_output_1.png
from sklearn.model_selection import train_test_split

import matplotlib.pyplot as plt

import numpy as np # linear algebra

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

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
import keras
from keras import Sequential
from keras.layers import Conv2D, MaxPooling2D, Dense, Flatten, Dropout
from keras.optimizers import Adam
from keras.callbacks import TensorBoard
df_train = pd.read_csv('../input/fashion-mnist_train.csv')
df_test = pd.read_csv('../input/fashion-mnist_test.csv')

train_data = np.array(df_train, dtype='float32')
test_data = np.array(df_test, dtype='float32')
X_train = train_data[:, 1:] / 255
y_train = train_data[:, 0]
X_test = test_data[:, 1:] / 255
y_test = test_data[:, 0]

X_train, X_validate, y_train, y_validate = train_test_split(X_train, y_train, test_size=0.2, random_state=42)
image = X_train[100, :].reshape((28, 28))
plt.imshow(image)
plt.show()