DLS Course 4- Week2 ResNet-Part2-ConvolutionBlok: Assertion Error

Not sure why getting an assertion error for the following code:

Second component of the main path (≈3 lines)

X = Conv2D(filters = F2, kernel_size = f, strides = (1,1), padding = 'same', kernel_initializer = initializer(seed=0))(X)
X = BatchNormalization(axis = 3)(X, training = training) # Default axis
X = Activation('relu')(X)

## Third component of main path (≈2 lines)
X = Conv2D(filters = F3, kernel_size = 1, strides = (1,1), padding = 'valid', kernel_initializer = initializer(seed=0))(X)
X = BatchNormalization(axis = 3)(X, training = training) # Default axis

##### SHORTCUT PATH ##### (≈2 lines)
X_shortcut = Conv2D(filters = F3, kernel_size = 1, strides = (s,s), padding = 'valid', kernel_initializer = initializer(seed=0))(X)
X_shortcut = BatchNormalization(axis = 3)(X, training = training) # Default axis

Hey, the issue seems to be in your shortcut path, checking it with the instructions will help.

Also, could you please remove the code when you’ve fixed it :slight_smile: ?

I also have this issue, change the x to x_shortcut problem solve !