Python/Tensorflow1 Tensorflow의 기초 - CNN 1. 이미지 학습하기(기본) 1) 데이터 불러오기 import tensorflow as tf mnist = tf.keras.datasets.mnist (x_train, y_train), (x_test, y_test) = mnist.load_data() x_train.shape, y_train.shape, x_test.shape, y_test.shape 2) 이미지 데이터 형식 이해하기 import numpy as np np.set_printoptions(linewidth=120) print(x_train[0]) 5가 보이는가? 실제 사진으로 한번 보겠다. plt.imshow(x_train[0]) 즉, 이미지는 결국 숫자의 행렬일뿐이다라는 사실이 중요하다. 행렬은 결국 숫자형 데이터이고, 숫자형 데이터는 .. 2023. 11. 30. 이전 1 다음