Итак, когда input_dim = 3, это означает, что вход в слой - это три узла, верно? Но что делать, когда используется атрибут input_shape и существует более одного значения? Например:
model = Sequential()
model.add(Conv2D(32, (3, 3), input_shape=(82, 82, 3)))
Здесь сверточный слой имеет 32 выходных узла, но сколько у него входных узлов?
model.summary () дает это:
Model: "sequential_1"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
conv2d_1 (Conv2D) (None, 80, 80, 32) 896
_________________________________________________________________
activation_1 (Activation) (None, 80, 80, 32) 0
_________________________________________________________________
max_pooling2d_1 (MaxPooling2 (None, 40, 40, 32) 0
_________________________________________________________________
conv2d_2 (Conv2D) (None, 38, 38, 32) 9248
_________________________________________________________________
activation_2 (Activation) (None, 38, 38, 32) 0
_________________________________________________________________
max_pooling2d_2 (MaxPooling2 (None, 19, 19, 32) 0
_________________________________________________________________
conv2d_3 (Conv2D) (None, 17, 17, 64) 18496
_________________________________________________________________
activation_3 (Activation) (None, 17, 17, 64) 0
_________________________________________________________________
max_pooling2d_3 (MaxPooling2 (None, 8, 8, 64) 0
_________________________________________________________________
flatten_1 (Flatten) (None, 4096) 0
_________________________________________________________________
dense_1 (Dense) (None, 64) 262208
_________________________________________________________________
activation_4 (Activation) (None, 64) 0
_________________________________________________________________
dropout_1 (Dropout) (None, 64) 0
_________________________________________________________________
dense_2 (Dense) (None, 1) 65
_________________________________________________________________
activation_5 (Activation) (None, 1) 0
=================================================================
Total params: 290,913
Trainable params: 290,913
Non-trainable params: 0
_________________________________________________________________