[딥러닝] CNN : MNIST Data set 숫자 이미지 데이터 학습 코드
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt mnist = tf.keras.datasets.mnist (train_x, train_y), (test_x, test_y) = mnist.load_data() train_x = train_x.reshape((60000, 28, 28, 1)) # 학습데이터 60000개, 28X28 사이즈, grey scale(1) test_x = test_x.reshape((10000, 28, 28, 1)) # 테스트 데이터 10000개, 28X28 사이즈, grey scale(1) train_x, test_x = train_x/255.0, test_x/255.0 # 픽셀 값을 0~1사이의..