Going deeper

Beeldmodellering met Keras

Ariel Rokem

Senior Data Scientist, University of Washington

Network with one convolutional layer

Beeldmodellering met Keras

Network with one convolutional layer: implementation

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'))
Beeldmodellering met Keras

Building a deeper network

Beeldmodellering met Keras

Building a deep network

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'))
Beeldmodellering met Keras

Why do we want deep networks?

Beeldmodellering met Keras

Features in early layers

Beeldmodellering met Keras

Features in intermediate layers

Beeldmodellering met Keras

Features in late layers

Beeldmodellering met Keras

How deep?

  • Depth comes at a computational cost
  • May require more data
Beeldmodellering met Keras

Let's practice!

Beeldmodellering met Keras

Preparing Video For Download...