2
對於以下CNNKeras得到錯誤的輸出形狀
model = Sequential()
model.add(Convolution2D(64, 3, 3, border_mode='same', input_shape=(3, 256, 256)))
# now model.output_shape == (None, 64, 256, 256)
# add a 3x3 convolution on top, with 32 output filters:
model.add(Convolution2D(32, 3, 3, border_mode='same'))
# now model.output_shape == (None, 32, 256, 256)
print(model.summary())
但是模型總結出下面的輸出
____________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
====================================================================================================
convolution2d_44 (Convolution2D) (None, 3, 256, 64) 147520 convolution2d_input_24[0][0]
____________________________________________________________________________________________________
convolution2d_45 (Convolution2D) (None, 3, 256, 32) 18464 convolution2d_44[0][0]
====================================================================================================
Total params: 165984
爲什麼會收到給定輸出形狀?
感謝。這真的很有幫助。 –
在〜/ .keras/keras.json,變 「image_dim_ordering」: 「TF」 到 「image_dim_ordering」: 「TH」 – Yakku