C5W4 assignment exercise 8: need help!

Hi all, I’m nearly done… faced some issues with the last graded cell… I notice that the call function of the Transformer class takes in a tar parameter… from the unit test, that is the target vocab size but I can’t figure out where in the code I should use it… I’m getting the assert:

assert np.allclose(translation[0, 0, 0:8],
48 [[0.02664799, 0.02222014, 0.01641812, 0.02407483,
—> 49 0.04251551, 0.02240461, 0.01556584, 0.03741234]]), “Wrong values in outd”

I think this could have something to do with my not using the ‘tar’ parameter passed in, but I don’t know wgere I should use it… can someone please help me?


In Transformer, inp (input sentence) is Encoder input, tar (target sentence) is Decoder input, shown as above pic.

2 Likes

thank you very much for your enlightenment… I solved it. merci beaucoup :smiley: