Course 4 Week 2, Assigment 1- Exercise 2 - convolutional_block error

Hi,

I’m unable to find my programming mistake about this message error :

Blockquote
tf.Tensor(
[[[0.53248286 0. 0.5028355 0. 0. 0.76121664]
[0.53248286 0. 0.5028355 0. 0. 0.76121664]]

[[0.53248286 0. 0.5028355 0. 0. 0.76121664]
[0.53248286 0. 0.5028355 0. 0. 0.76121664]]], shape=(2, 2, 6), dtype=float32)

AssertionError Traceback (most recent call last)
Input In [8], in <cell line: 3>()
1 ### you cannot edit this cell
----> 3 public_tests.convolutional_block_test(convolutional_block)

File /tf/W2A1/public_tests.py:115, in convolutional_block_test(target)
112 tf.keras.backend.set_learning_phase(True)
114 C = target(X, f = 2, filters = [2, 4, 6])
→ 115 assert np.allclose(C.numpy(), convolutional_block_output2), “Wrong values when training=True.”
117 print(‘\033[92mAll tests passed!’)

AssertionError: Wrong values when training=True.

Someone can help me because I can’t go further in exercices ?
Thank you

I have found my mistake.
I forgot to add (seed=0) to initiailizer

{moderator edit - solution code removed}

Have a nice day !
Bye

2 Likes

It’s great that you were able to find the problem under your own power. Nice work!