BaşlayınÜcretsiz Başlayın

Add strides to a convolutional network

The size of the strides of the convolution kernel determines whether the kernel will skip over some of the pixels as it slides along the image. This affects the size of the output because when strides are larger than one, the kernel will be centered on only some of the pixels.

Bu egzersiz

Image Modeling with Keras

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

Construct a neural network with a Conv2D layer with strided convolutions that skips every other pixel.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Initialize the model
model = Sequential()

# Add the convolutional layer
model.add(Conv2D(10, kernel_size=3, activation='relu', 
              input_shape=(img_rows, img_cols, 1), 
              ____))

# Feed into output layer
model.add(Flatten())
model.add(Dense(3, activation='softmax'))
Kodu Düzenle ve Çalıştır