<jupyter_start><jupyter_text>『作業內容』   依照指示，透過調整Padding、Strides參數控制輸出Feature map大小  『目標』   了解輸出feature map尺寸變化原理<jupyter_code>from keras.models import Sequential
from keras.layers import Convolution2D
from keras.layers import Input, Dense
from keras.models import Model
#kernel size=(6,6)
#kernel數量：32
#Same padding、strides=(1,1)

classifier=Sequential()
inputs = Input(shape=(13,13,1))

x=Convolution2D(kernel_size=(6,6), padding='same', filters=32)(inputs)
model = Model(inputs=inputs, outputs=x)
model.summary()

# Same padding、strides=(2,2)
classifier=Sequential()
inputs = Input(shape=(13,13,1))

x=Convolution2D(kernel_size=(6,6), padding='same',strides=(2,2), filters=32)(inputs)
model = Model(inputs=inputs, outputs=x)
model.summary()

# Valid padding、strides=(1,1)
classifier=Sequential()
inputs = Input(shape=(13,13,1))

x=Convolution2D(kernel_size=(6,6), filters=32)(inputs)
model = Model(inputs=inputs, outputs=x)
model.summary()

# Valid padding、strides=(2,2)
classifier=Sequential()
inputs = Input(shape=(13,13,1))

x=Convolution2D(kernel_size=(6,6), strides=(2,2), filters=32)(inputs)
model = Model(inputs=inputs, outputs=x)
model.summary()<jupyter_output>Model: "model_4"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
input_4 (InputLayer)         (None, 13, 13, 1)         0         
_________________________________________________________________
conv2d_4 (Conv2D)            (None, 13, 13, 32)        1184      
=================================================================
Total params: 1,184
Trainable params: 1,184
Non-trainable params: 0
_________________________________________________________________
Model: "model_5"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
input_5 (InputLayer)         (None, 13, 13, 1)         0         
_________________________________________________________________
conv2d_5 (Conv2D)            (None, 7, 7[...]
{'fraction_non_alphanumeric': 0.20045977011494254, 'fraction_numerical': 0.04597701149425287, 'mean_word_length': 5.907936507936508, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '552911', 'license': 'MIT', 'n_tokens_mistral': 673, 'n_tokens_neox': 636, 'n_words': 120, 'path': 'Day012_Strides_and_Padding_HW.ipynb', 'repo_name': 'semishen/DL-CVMarathon', 'size': '2175'}