Name 'EncoderLayer' is not defined

In the Week 4 exercise of the 5th course, I am unable to complete the Encoder cell due to the error that is thrown during the test:

Any help is greatly appreciated! Thanks in advance.

Shreyas

UPDATE: I was able to overcome the error by making some changes to my code. Now I ran into this AssertionError:

UPDATE: Looks like one of the cells was incomplete and I accidentally overlooked it. That is most probably the error.

I recommend you restart the kernel and run all of the cells again.