Week 2 : Programming Assignment: Residual Networks
Facing this error. please guide.
NameError Traceback (most recent call last)
Input In [27], in <cell line: 13>()
9 X3 = np.ones((1, 4, 4, 3)) * 3
11 X = np.concatenate((X1, X2, X3), axis = 0).astype(np.float32)
—> 13 A3 = identity_block(X, f=2, filters=[4, 4, 3],
14 initializer=lambda seed=0:constant(value=1))
15 print(‘\033[1mWith training=False\033[0m\n’)
16 A3np = A3.numpy()
Input In [26], in identity_block(X, f, filters, initializer)
24 # First component of main path
25 X = Conv2D(filters = F1, kernel_size = 1, strides = (1,1), padding = ‘valid’, kernel_initializer = initializer(seed=0))(X)
—> 26 X = BatchNormalization(axis = 3)(X, training = training) # Default axis
27 X = Activation(‘relu’)(X)
29 ### START CODE HERE
30 ## Second component of main path (≈3 lines)
NameError: name ‘training’ is not defined