-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I found this during HW1 of the Modern AI Course. I solved problem 10 using recursion, i.e. by having batch_matmul() call itself. This doesn't work, missing the function itself.
Presumably this happens because the test decorator makes the test execute before the def command is completed, so the function is never added to the global symbol table. The test fails, then, so the function isn't defined afterwards either. Normally it is defined afterwards, as proven by the ability to call prior exercises from later ones.
The work-around is to remove the decorator, execute the cell once, then add the decorator again - with the caveat, that you need to do this again for further changes to the code, because otherwise you get an obsolete version of the function in the global symbol table.
It would be nice, to have the function defined before it is executed.