Assignment 2: Transformer Summarizer2

Hello everyone,

unfortunately I get the following message in the grader for Assignment 2: Transformer Summarizer in Week 3 :

“There was a problem compiling the code from your notebook. Details:
‘NoneType’ object is not callable”. This error appears at every point. I have already restarted the assignment and rebooted it. There are no more None values, except at a position where it explicitly states that the None value should not be changed. I have also passed every unit test. What else could be the problem? I have been trying to solve the problem for 2 hours.

Kind regards

Fabian Birli

2 Likes

Can you share screenshot of the grader submission where it shows why you failed assignment ?

You can share the screenshot of the error you mentioned if you are getting in the assignment. if this error is from the grader output then probably it is somewhere at the beginning only.

Also there is no assignment name with Tranformer in the course you have selected, so kindly clarify which course you are having the issue.

Your assignment is from NLP with Attention Models right, the fourth course from NLP specialisation?

2 Likes

I have the same problem right now with course NLP with Attention Models. with week 1 and 2


1 Like

Hello @Mikolaj_Ryba

Please check for below code line
add the mask to the scaled tensor,

did you recall correctly as it mentions
if mask is not None:

Reminder: The boolean mask parameter can be passed in as none or as either padding or look-ahead.

  • Multiply (1. - mask) by -1e9 before adding it to the scaled attention logits

So make sure you have mask by the above statement to the scaled_attention_logits recalled just before this code line.

Regards
DP

1 Like