hi,
I am stuck and cant figure out why my result is not matching to expected value
And there is assertion Error: Check the padding and strides.
Kindly help me please.
### START CODE HERE ###
# Second component of main path (≈3 lines)
X = Conv2D(filters = F2, kernel_size = (f, f), strides = (1,1), padding = 'same', kernel_initializer = glorot_uniform(seed=0))(X)
X = BatchNormalization(axis = 3)(X)
X = Activation('relu')(X, training = training)
# Third component of main path (≈2 lines)
X = Conv2D(filters = F3, kernel_size = (1, 1), strides = (1,1), padding = 'valid', kernel_initializer = glorot_uniform(seed=0))(X)
X = BatchNormalization(axis = 3)(X, training = training)
# Final step: Add shortcut value to main path, and pass it through a RELU activation (≈2 lines)
X = Add()([X_shortcut, X])
X = Activation('relu')(X)
### END CODE HERE ###
My results versus expected results
With training=False
[[[0. 0. 0. 0. ]
[0. 0. 0. 0. ]]
[[1.16404 1.16404 1.16404 1.81691]
[1.23441 1.23441 1.23441 1.3923 ]]
[[3.4921 3.4921 3.4921 5.45072]
[3.70323 3.70323 3.70323 4.17691]]]
1.2344106
With training=True
[[[0. 0. 0. 0. ]
[0. 0. 0. 0. ]]
[[0.81198 0.81198 0.81198 0.81198]
[0.81198 0.81198 0.81198 0.81198]]
[[3.28676 3.28676 3.28676 3.48738]
[3.41158 3.41158 3.41158 4.11966]]]
Expected value
With training=False
[[[ 0. 0. 0. 0. ]
[ 0. 0. 0. 0. ]]
[[192.71234 192.71234 192.71234 96.85617]
[ 96.85617 96.85617 96.85617 48.92808]]
[[578.1371 578.1371 578.1371 290.5685 ]
[290.5685 290.5685 290.5685 146.78426]]]
96.85617
With training=True
[[[0. 0. 0. 0. ]
[0. 0. 0. 0. ]]
[[0.40739 0.40739 0.40739 0.40739]
[0.40739 0.40739 0.40739 0.40739]]
[[4.99991 4.99991 4.99991 3.25948]
[3.25948 3.25948 3.25948 2.40739]]]