C5 Week 4 A1 exercise 4 "Wrong Values"

What should be the input for the self_attn_output = self.mha(…), im using (x,x,x) as input.

AssertionError Traceback (most recent call last)
in
17
18
—> 19 EncoderLayer_test(EncoderLayer)

in EncoderLayer_test(target)
12 [[-0.5214877 , -1.001476 , -0.12321664, 1.6461804 ],
13 [-1.3114998 , 1.2167752 , -0.5830886 , 0.6778133 ],
—> 14 [ 0.25485858, 0.3776546 , -1.6564771 , 1.023964 ]],), “Wrong values”
15
16 print("\033[92mAll tests passed")

AssertionError: Wrong values

Hi @Prabhat ,

The output returned from the encoder_layer() when turned into numpy array should be the same as those values it is comparing with.
[[-0.5214877 , -1.001476 , -0.12321664, 1.6461804 ],
[-1.3114998 , 1.2167752 , -0.5830886 , 0.6778133 ],
[ 0.25485858, 0.3776546 , -1.6564771 , 1.023964 ]]

Here is a link to the official doc