텐서플로우1 [TensorFlow] 아이리스 분류 예제와 함수 설명 이 예제에서는 케라스 대신 텐서플로우의 저수준 API를 사용하며, 크로스 엔트로피 손실 함수를 사용합니다. 아래는 전체 코드입니다. 기본 예제 import tensorflow as tf from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.preprocessing import OneHotEncoder import numpy as np # 아이리스 데이터 로드 iris = datasets.load_iris() X = iris.data y = iris.target.reshape(-1, 1) # 원핫 인코딩 .. 2023. 9. 8. 이전 1 다음