NameError Traceback (most recent call last)
Input In [16], 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 [15], in identity_block(X, f, filters, initializer)
6 “”"
7 Implementation of the identity block as defined in Figure 4
8
(…)
18 X – output of the identity block, tensor of shape (m, n_H, n_W, n_C)
19 “”"
20 # defining name basis
—> 21 conv_name_base = ‘res’ + str(stage) + block + ‘_branch’
22 bn_name_base = ‘bn’ + str(stage) + block + ‘_branch’
23 # Retrieve Filters
NameError: name ‘stage’ is not defined