การจำแนกประเภทแบบหลายคลาส

Deep Learning เบื้องต้นด้วย Keras

Miguel Esteban

Data Scientist & Founder

การขว้างลูกดอก

Deep Learning เบื้องต้นด้วย Keras

ชุดข้อมูล

Deep Learning เบื้องต้นด้วย Keras

ชุดข้อมูล

Deep Learning เบื้องต้นด้วย Keras

สถาปัตยกรรมโมเดล

Deep Learning เบื้องต้นด้วย Keras

สถาปัตยกรรมโมเดล

Deep Learning เบื้องต้นด้วย Keras

สถาปัตยกรรมโมเดล

Deep Learning เบื้องต้นด้วย Keras

เลเยอร์เอาต์พุต

Deep Learning เบื้องต้นด้วย 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')
Deep Learning เบื้องต้นด้วย Keras

Categorical cross-entropy

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

Deep Learning เบื้องต้นด้วย 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)
Deep Learning เบื้องต้นด้วย Keras

One-hot encoding

Deep Learning เบื้องต้นด้วย Keras

มาฝึกกันเถอะ!

Deep Learning เบื้องต้นด้วย Keras

Preparing Video For Download...