SeqModelWeek4 Error in Encoder

I am using below code for encoder, I cant see anything wrong - However, I’m getting Assertion error -

###ERROR

AssertionError Traceback (most recent call last)
in
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

###CODE

# UNQ_C5 (UNIQUE CELL IDENTIFIER, DO NOT EDIT)
# GRADED FUNCTION
class Encoder(tf.keras.layers.Layer):

mentor edit: code removed

Hi @forthe_websites3,

I have moved this post to the DLS Course 5 category as other learners taking the same course might benefit from this.

Kindly make sure if you have any course-specific queries, explore the specialization category and post in the relevant course subcategory as course-specific mentors are actively answering the queries there. The General Discussions category is not monitored by our mentors.

If you are unclear about how to use Discourse, we have made this guide for our learners. I believe that reading this will help you out posting in the appropriate categories next time!


Happy Learning!!
Sharob

Please do not post your code on the Forum.