Hi, I am getting the error:
[[0 0 1 1]]
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-46-68aa9b8f5815> in <module>
1 # UNIT TEST
----> 2 Encoder_test(Encoder)
~/work/W4A1/public_tests.py in Encoder_test(target)
124 [[-0.4612937 , 1.0697356 , -1.4127715 , 0.8043293 ],
125 [ 0.27027237, 0.28793618, -1.6370889 , 1.0788803 ],
--> 126 [ 1.2370994 , -1.0687275 , -0.8945037 , 0.7261319 ]]]), "Wrong values case 1"
127
128 encoderq_output = encoderq(x, True, np.array([[[[1., 1., 1.]]], [[[1., 1., 0.]]]]))
AssertionError: Wrong values case 1
when I run this in UNQ C5
# START CODE HERE
# Pass input through the Embedding layer
x = self.embedding(x) # (batch_size, input_seq_len, embedding_dim)
# Scale embedding by multiplying it by the square root of the embedding dimension
x *= tf.math.sqrt(tf.cast(self.embedding_dim, tf.float32))
# Add the position encoding to embedding
x += self.pos_encoding[:, :seq_len, :]
# Pass the encoded embedding through a dropout layer
x = self.dropout(x, training=training)
# Pass the output through the stack of encoding layers
for i in range(self.num_layers):
x = self.enc_layers[i](x, training, mask)
# END CODE HERE
P.S.- I am sorry if this seems like a silly mistake but I am having difficulty in this assignment and after reading many threads I am following this Transformer model for language understanding