更深入

使用 Keras 进行图像建模

Ariel Rokem

Senior Data Scientist, University of Washington

含一层卷积的网络

使用 Keras 进行图像建模

含一层卷积的网络:实现

model = Sequential()
model.add(Conv2D(10, kernel_size=2, activation='relu', 
                 input_shape=(img_rows, img_cols, 1)))
model.add(Flatten())
model.add(Dense(3, activation='softmax'))
使用 Keras 进行图像建模

构建更深的网络

使用 Keras 进行图像建模

构建深层网络

model = Sequential()
model.add(Conv2D(10, kernel_size=2, activation='relu', 
                 input_shape=(img_rows, img_cols, 1), 
                 padding='equal'))

# Second convolutional layer model.add(Conv2D(10, kernel_size=2, activation='relu')
model.add(Flatten()) model.add(Dense(3, activation='softmax'))
使用 Keras 进行图像建模

为何需要深层网络?

使用 Keras 进行图像建模

早期层的特征

使用 Keras 进行图像建模

中间层的特征

使用 Keras 进行图像建模

后期层的特征

使用 Keras 进行图像建模

多深合适?

  • 深度带来计算开销
  • 可能需要更多数据
使用 Keras 进行图像建模

让我们来练习!

使用 Keras 进行图像建模

Preparing Video For Download...