Hello,
in the assignement1 in week2
I have this error “AssertionError: Wrong values when training=False.” when implement “Convolutional Block” exercise
and I am sure that the input of shortcut path is correct,
but I guess that the error is resulted by the random initialization seed for the kernels, although I have written the code as it is written in the template, and make the seed 0 for initializer for all the convolutional layers,
but I guess that the error is resulted by the seed because I get different value for A in each time I execute the following code:
from outputs import convolutional_block_output1, convolutional_block_output2
np.random.seed(1)
#X = np.random.randn(3, 4, 4, 6).astype(np.float32)
X1 = np.ones((1, 4, 4, 3)) * -1
X2 = np.ones((1, 4, 4, 3)) * 1
X3 = np.ones((1, 4, 4, 3)) * 3
X = np.concatenate((X1, X2, X3), axis = 0).astype(np.float32)
A = convolutional_block(X, f = 2, filters = [2, 4, 6], training=False)
assert type(A) == EagerTensor, “Use only tensorflow and keras functions”
assert tuple(tf.shape(A).numpy()) == (3, 2, 2, 6), “Wrong shape.”
assert np.allclose(A.numpy(), convolutional_block_output1), “Wrong values when training=False.”
print(A[0]).
can any one help me please