Finally got past this one. Yes, restarting the worksheet did help sort things out, but I had one persistent bug in my code.
Honor system won’t let me put the code here of course, but you need the same number (albeit different ones) of parameters to the LSTM_Cell call in music inference model the as you had in the DJ model. If you’ve tried everything else, look closely at how you got past the DJ model part of the assignment.
Some of the cells are stateful. Running them out of order doesn’t work. Or running some of them more than once individually. Or some combination of the above. It’s probably not worth spending any more mental energy on this, but if you really wanted to you could probably find some order in which to run the various cells that would produce the bug.
But the solution is simple, so it is up to you whether that investigation is worth your time.
Or maybe the bug is that you changed some code but didn’t actually click “Shift-Enter” on that cell, but ran the later cells again. That just runs the old code again. But then doing “Cell → Run All” activates your new code.
Just typing new code in a cell and then calling that function again does nothing: it just runs the previous version of the code again. You can easily demonstrate this: take a function that works and purposely break it by multiplying the return value by 2. Now run the test cell again and it still works. What? But then click “Shift-Enter” on the modified cell and then run the test again. Kaboom!