다중 클래스 분류

Keras로 시작하는 딥 러닝

Miguel Esteban

Data Scientist & Founder

다트 던지기

Keras로 시작하는 딥 러닝

데이터셋

Keras로 시작하는 딥 러닝

데이터셋

Keras로 시작하는 딥 러닝

아키텍처

Keras로 시작하는 딥 러닝

아키텍처

Keras로 시작하는 딥 러닝

아키텍처

Keras로 시작하는 딥 러닝

출력층

Keras로 시작하는 딥 러닝

다중 클래스 모델

# Instantiate a sequential model
# ...

# Add an input and hidden layer # ...
# Add more hidden layers # ...
# Add your output layer model.add(Dense(4, activation='softmax')
Keras로 시작하는 딥 러닝

범주형 크로스엔트로피

model.compile(optimizer='adam', loss='categorical_crossentropy')

Keras로 시작하는 딥 러닝

데이터셋 준비

import pandas as pd
from tensorflow.keras.utils import to_categorical

# Load dataset
df = pd.read_csv('data.csv')

# Turn response variable into labeled codes df.response = pd.Categorical(df.response) df.response = df.response.cat.codes
# Turn response variable into one-hot response vector y = to_categorical(df.response)
Keras로 시작하는 딥 러닝

원-핫 인코딩

Keras로 시작하는 딥 러닝

연습해 봅시다!

Keras로 시작하는 딥 러닝

Preparing Video For Download...