MNIST 손글씨 데이터셋을 사용하여 인공신경망(ANN) 모델 학습 및 결과 시각화
from tensorflow.keras.datasets import mnistfrom tensorflow.keras.models import Sequentialfrom tensorflow.keras.layers import Densefrom tensorflow.keras.callbacks import ModelCheckpoint, EarlyStoppingimport matplotlib.pyplot as pltimport numpy as npimport osimport tensorflow as tf# seed 값 설정seed = 0np.random.seed(seed) tf.random.set_seed(seed)# MNIST 데이터 불러오기(X_train, Y_train), (X_test, Y_test) =..
AI(인공지능)
2024. 11. 11. 15:38