Hi,
Having gone through this assignment, I’d love to share my perspective which would help other students.
When trying to solve this exercise, the following things should be gone through, step-by-step. Firstly,
This diagram has been provided. Please go through it carefully, merely by understanding the flow, 50% of problem is solved already.
The next section you should look closely is this:
Then next:
And finally, read carefully the helper comments just before each line of code to be written.
I feel if students follow this flow, it’ll be much easier. Part of the problem lies in the fact that:
- Lack of understanding about the flow, i.e., which part is supposed to go where, etc.
- Confusion regards how to call the functions
One more hint: for the first line, it goes like this:
self.mha(parameter_1=<input variable>, parameter_2=<input variable>, parameter_3=<input variable>, mask_parameter=<mask variable>)
Further, before going for coding, first take a screenshot of the diagram and keep it to the side. Then, as you write code, keep referring to the diagram so that the correct flow is in mind. When I was solving this assignment, this last aspect was the barrier between me and success.
Hopefully this is of help to someone.
Reference: C5_W4_A1 DON'T PANIC! Transformer help is on the way
I’d suggest going through the reference first and then my perspective. That’s just my suggestion; you could do whatever you like first