If you pass one test (getting the correct number of trainable parameters) but fail a different test, the type of error to look for is non-general code. E.g. you may be hard-coding some assumptions about the input parameters or referencing global variables from the body of your function.
If that suggestion doesn’t shed any light, then another way to investigate would be to look at the unittest code and see what it is doing differently than the test in the notebook. Perhaps that would give you a more concrete clue about the type of error to be looking for. The unittests are in a separate file, which you can view by opening the file unittests.py that you can see in the “File Explorer” view of the assignment.
With what @paulinpaloalto mentioned as the first checkpoint, chances are your codes must not run down properly even if your codes might be correct (depending on your earlier unittest results and other variable recall conflicts)
Clear out kernel output, re-run codes again individually from beginning till the unitteest it didn’t pass earlier with the confidence that your codes are correct, you can also try this approach as sometimes kernels gets disconnected. The reason I am telling you try this is because of the unittest is mentioning your training of parameters didn’t complete, that means there could be some disconnect icity issues too.
I have seen this error in Ex 4 of this assignment before, and if I’m not wrong, I know what is the matter here. This is on my radar to eleborate the failed test with more details.
I’m 99% sure that in your implementation you are not using .numel() method as expected (instead you might be using a different method). Take a look at the “Additional Code Hints” of this exercise.