Hello team,
I have been struggling for over several hours to get rid of the error in subject, with implementation of “EncoderLayer”. I have followed everything as per the instructions, as follows.
- Applied Self attention using self.mha - arguments (mentor edit: removed)
- Applied layer norm for above output; self.layernorm1 with args (mentor edit: removed)
- Passed above output to Feed forward neural network - self.ffn with args (mentor edit: removed)
- Applied drop out layer on above output. self.dropout_ffn with args (mentor edit: removed)
- Applied layer norm to the sum of above output and MHA. self.layernorm2 with args (mentor edit: removed)
Is there anything I am missing, kindly advise please. Below is the error that I get with the Unit Test(EncoderLayer_test).
AssertionError Traceback (most recent call last)
in
1 # UNIT TEST
----> 2 EncoderLayer_test(EncoderLayer)
~/work/W4A1/public_tests.py in EncoderLayer_test(target)
92 [[ 0.23017104, -0.98100424, -0.78707516, 1.5379084 ],
93 [-1.2280797 , 0.76477575, -0.7169283 , 1.1802323 ],
—> 94 [ 0.14880152, -0.48318022, -1.1908402 , 1.5252188 ]]), “Wrong values when training=True”
95
96 encoded = encoder_layer1(q, False, np.array([[1, 1, 0]]))
AssertionError: Wrong values when training=True