link: Coursera | Online Courses & Credentials From Top Educators. Join for Free | Coursera
I did pass all tests inside the lab, but the grader kept showing me this strange errorr message. As fas as I know, torch does have linalg module. So what is going on? What can I do to fix this error? Thank you for spending your time!
I got the same error. Make Some Changes in the file and run the validator in the notebook.
Hi @FreyMiggen ,
Could you do a clean rerun of the code, from the menu bar at the top of your notebook:
kernel->restart and clear all output
cell → run all
The other thing to try is the first step that Kic suggested and then submit to the grader. The point is that the grader does not need to see your output: it only needs to call your functions. We have seen cases in which the generated output interferes with the grader. Try this sequence:
Kernel → Restart and Clear Output
Save
Submit
Please try that and let us know if it makes any difference.
@Kic @Hamzzyy @paulinpaloalto Thank your all for your advice! Unfortunately, I followed them all but the same error kept showing up!
What can I do now? Thank you!
We’ll need to look at your source code. We can’t do that in a public thread, but I will DM you about how to proceed.
To close the loop on the public thread, the problem is that the code uses torch.linalg.norm
to compute the norm in the get_score
function. That works in the notebook, but fails the grader. It appears that the grader uses an older version of PyTorch. If you just use torch.norm
, it works in both the notebook and the grader. Note that they give you that example in the “hints” for the get_score
function.
Thank you for your instruction!
I followed your advice and it worked!
Thank you for helping me out!
Have a great day!
Best regards,
Kim
Vào Th 5, 18 thg 1, 2024 vào lúc 12:08 Paul Mielke via DeepLearning.AI <notifications@dlai.discoursemail.com> đã viết: