建立 Keras 模型

Python 深度學習入門

Dan Becker

Data Scientist and contributor to Keras and TensorFlow libraries

建模步驟

  • 指定架構

  • 編譯

  • 擬合

  • 預測

Python 深度學習入門

模型規格

import numpy as np
from tensorflow.keras.layers import Dense
from tensorflow.keras.models import Sequential

predictors = np.loadtxt('predictors_data.csv', delimiter=',')
n_cols = predictors.shape[1]

model = Sequential()
model.add(Dense(100, activation='relu', input_shape = (n_cols,)))
model.add(Dense(100, activation='relu'))
model.add(Dense(1))
Python 深度學習入門

一起來練習吧!

Python 深度學習入門

Preparing Video For Download...