AI 인공지능/딥러닝 Practices

07.17 CLASS SUMMARY (mnist ①)

dngus_tak 2021. 8. 1. 00:28

mnist는 손글씨를 인식하는 대형 데어티베이스이다.

keras와 tensorflow를 이용해 그 기초 코드를 만들어 보았다.

 

import tensorflow as tf
import matplotlib.pyplot as plt
import numpy as np

mnist = tf.keras.datasets.mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()

plt.imshow(x_train[0])
plt.show()

print(x_train.shape)
print(x_test.shape)