In the programming assignment of week 2 of course 4, for exercise 4 - transformer, the test case is failing, here’s the output of the test case:
Failed test case: Wrong values in summary.
Expected: [0.04855702, 0.03407773, 0.01294427, 0.05483282, 0.03182802, 0.01409046, 0.02963346, 0.04003222]
Got: [0.04887775 0.03356204 0.01315448 0.05506424 0.0318282 0.01480375
0.02955461 0.03947698]
Failed test case: Wrong values in weights[decoder_layer1_block1_self_att].
Expected: [0.481374, 0.51862603, 0.0, 0.0, 0.0]
Got: [0.4926643 0.5073357 0. 0. 0. ]
Failed test case: Wrong values in summary.
Expected: [0.05015587, 0.02734077, 0.01308834, 0.04876801, 0.03092919, 0.02046618, 0.02923589, 0.03272967]
Got: [0.050137 0.02713667 0.01314374 0.04854858 0.03089247 0.02079512
0.02920983 0.03248784]
The expected output and the output values provided by the code don’t have much difference, but I couldn’t understand what’s causing the code not to provide the exact output.
The ‘test your function’ block for the same code is working fine, its output matches the ‘expected output’.
Any help would be appreciated!