Iâm not a mentor for this course, but my interpretation of that error message is that the type of the argument you are passing to create_padding_mask
is incorrect: it should be a Tensor, but it is some higher level object. So how did that happen? In TF there are a lot of cases in which functions (e.g. âlayerâ functions) return functions and then you call those functions with a Tensor as argument. Maybe youâve got a case like that where you forgot to actually invoke the resulting âlayerâ function and just passed the function itself.
As I mentioned earlier, I am not a mentor for this course, so I donât know the details of this assignment. Debugging starts with understanding what the error is telling you. My interpretation of this without understanding the actual mechanics of any of these functions is that the return value from your answer_question
function is somehow not correct. It is expected to be a tensor with at least one dimension, but apparently it isnât. So you need to figure out why that happened.
You can also see this by comparing your output versus the âExpected Outputâ. Your return value is 97, which is a scalar number. The expected value is a string.
the enc_padding_mask code is correct.
Your error is probably directing you to go back and check in previous cell, how you recalled your ids.
I would go back check if idx is being recalled correctly in my first grade cell seeing your last error.
regards
DP
are you recall your model correctly?
You can DM the screenshot of the grade cell you got your test failed via personal DM. click on my name and then message.
Regards
DP
in code recall for next word, you are using incorrect code for model as transformer as the assigned argument for that grade cell use it as model, you are suppose to use model instead of transformer. @Mohammad_Ashraf1
Also use the search tool, you will find similar post threads for your query.
Regards
DP
i got the same error , is the error in test file
The screenshot you shared didnât mention all of the codes for the grade cell, so until I donât know if there are more error, I cannot confirm anything. No there are no errors in test file.
Also I am hoping you are using an updated version of the assignment as there were some changes done in the assignment recently. So in case you havenât, you might need to get a fresh copy and re-do the assignment.
Regards
DP
i send you the entire code
@Deepti_Prasad I didnât see the file, but as I see you as team member, well âokayâ, perhaps we step away from that thought.
i have updated the lab and code and i solve the issue , thank you for your response
You are using an obsolete copy of assignment. Kindly get a fresh copy and re-do your assignment.
Please refer below link comment for how to get a fresh copy.
Let me know if you still get the same error.
Also for the error which you mentioned in the first comment, it is pointing towards your input not being recalled correctly, so I would first suspect and check parse_squad grade cell as there could be some correction required on how you recalled the arguments. But in your case, first you need to do assignment on an updated assignment.
Regards
DP
I am sorry I didnât get your question!!!
What do you mean by this?