Typo/bug in Course 3 Week 3 Exercise 2 DECODER Forward method for device mentioned as x

hi @Mubsi,

While I was doing week 3 assignment for exercise 2. Decoder, in the forward method, where instruction states to create a subsequent mask and pass it to same device as inputs, so when I opened the notebook the section already mentioned this step as

tgt_seq_len=None
tgt_subsequent_mask= None.to(x.device)

So I only replaced None with code thinking x is the device although I didn’t find in the arguments about this mentioned but markdown mentioned target sequence as x.

When I run down the grade function it run down successfully but failed in unittest :backhand_index_pointing_down:t2:

That’s when I looked into hints which did mention the correct device as tgt :backhand_index_pointing_down:t2:

But this caused unnecessary confusion and failed unittest, so instead of mentioning as x.device either mention the tgt_subsequent_mask as just None or None.to(None.device) preventing any unnecessary confusion.

Regards

DP

2 Likes

This line also confused me a lot and I couldn’t find what was wrong there. At first I thought ‘x’ was a typo so I removed it and used only .to(device) but it threw errors. Then I found your post and realized it was ‘tgt’ that needed to be used.
I hope DeepLearning team fixes it soon.

1 Like

@Mubsi

can you please do this correction in the lab.

Hi @Deepti_Prasad,

Have you reported a the issue about this in github? If not, please do that.

Thanks,
Mubsi

This has been fixed.