अपनी convolutions को ट्यून करें

Keras के साथ Image Modeling

Ariel Rokem

Senior Data Scientist, University of Washington

Convolution

Keras के साथ Image Modeling

Zero padding के साथ convolution

Keras के साथ Image Modeling

Keras में zero padding

model.add(Conv2D(10, kernel_size=3, activation='relu', 
                 input_shape=(img_rows, img_cols, 1)),
                 padding='valid')
Keras के साथ Image Modeling

Keras में zero padding

model.add(Conv2D(10, kernel_size=3, activation='relu', 
                 input_shape=(img_rows, img_cols, 1)),
                 padding='same')
Keras के साथ Image Modeling

Strides

Keras के साथ Image Modeling

Keras में strides

model.add(Conv2D(10, kernel_size=3, activation='relu', 
                 input_shape=(img_rows, img_cols, 1)),
          strides=1)
Keras के साथ Image Modeling

Keras में strides

model.add(Conv2D(10, kernel_size=3, activation='relu', 
                 input_shape=(img_rows, img_cols, 1)),
          strides=2)
Keras के साथ Image Modeling

उदाहरण

Keras के साथ Image Modeling

आउटपुट का आकार कैसे निकालें

$$O = ((I - K + 2P) / S) + 1$$

जहाँ

  • $I$ = input का आकार
  • $K$ = kernel का आकार
  • $P$ = zero padding का आकार
  • $S$ = strides
Keras के साथ Image Modeling

आउटपुट का आकार कैसे निकालें

$$ 28 = ((28 - 3 + 2) / 1) + 1$$

$$ 10 = ((28 - 3 + 2) / 3) + 1$$

Keras के साथ Image Modeling

Dilated convolutions

Keras के साथ Image Modeling

Keras में dilation

model.add(Conv2D(10, kernel_size=3, activation='relu', 
                 input_shape=(img_rows, img_cols, 1)),
          dilation_rate=2)
Keras के साथ Image Modeling

अभ्यास करते हैं!

Keras के साथ Image Modeling

Preparing Video For Download...