I finished the assignment and submitted it despite the one test case supposedly failing. I passed with 100/100 so I guess this is not a problem for the grader
@zer2 I had the same outcome. So I submitted the homework and it could pass through 100% , although the error happened reiteratedly. @TMosh I doubt very much that there may be problems with some functions called by create_training_example, but they pass through their unit-tests. What I mean is that the problem may not be with create_training_example itself.
Maybe the @deeplearning team should take a look at this homework and co.
In step 1: not using get_random_time_segment().
In step 2: not using “is_overlapping()” in the “while” loop test clause.
In step 3: not using the “append()” method.
Another cause for these types of problems is if you re-run only individual cells. The assignments use a lot of global variables, and it’s very easy to get them into invalid states.
Restarting the kernel and re-running all of the cells should be in your kit of tools whenever you get an unexpected error.
If you have downloaded the notebook and run locally, the UNIT TEST may fail, because it’s likely that backgrounds[idx] in your local folder ≠backgrounds[index] in Coursera site folder, activates[idx] ≠activates[idx], negatives[idx] ≠negatives[idx] etc… You can check it by listening to the .wav files or checking for the len(activates[idx]) etc… For instance:
I had the same problem but the final grader returned 0/100.
I solved this by initialising the segment_time variable in the create_training_example function and then using it in both calls to insert_audio_clip.
Hi
Thanks for your help.
Attached is a zipped version of the notebook (please note that in order to be able to attach the file I had to keep the ipynb extension).
{moderator edit: deleted attachment}
FYI, to use a private message, you click on a name and select the “Message” button.
Posting your code on the forum is not allowed.
I’ll review it and provide feedback.