Hi guys,
I get an error whenever create_training_examples is called and the grader cannot compile my notebook.
The error: Cell #24 Can’t compile student’s code. Error: ValueError(‘low >= high’)
However the error points to get_random_time_segment, which is not implemented by us.
I have not added or removed any cells, nor commented out any of the original code. Never had a problem since C1W1. I tried get the last version of the assignment and rebooted the server, but it is not working. The unit tests for insert_audio_clip are all passed
I would appreciate any help as this is delaying my progress in the course.
Here is the traceback:
ValueError Traceback (most recent call last)
in
17 print(“\033[92m All tests passed!”)
18
—> 19 create_training_example_test(create_training_example)
in create_training_example_test(target)
2 def create_training_example_test(target):
3 np.random.seed(18)
----> 4 x, y = target(backgrounds[0], activates, negatives, 1375)
5
6 assert type(x) == np.ndarray, “Wrong type for x”
in create_training_example(background, activates, negatives, Ty)
37 for random_activate in random_activates: # @KEEP
38 # Insert the audio clip on the background
—> 39 background, segment_time = insert_audio_clip(background, audio_clip, random_activate)
40 # Retrieve segment_start and segment_end from segment_time
41 segment_start, segment_end = segment_time
in insert_audio_clip(background, audio_clip, previous_segments)
22 # Step 1: Use one of the helper functions to pick a random time segment onto which to insert
23 # the new audio clip. (≈ 1 line)
—> 24 segment_time = get_random_time_segment(segment_ms)
25
26 # Step 2: Check if the new segment_time overlaps with one of the previous_segments. If so, keep
in get_random_time_segment(segment_ms)
10 “”"
11
—> 12 segment_start = np.random.randint(low=0, high=10000-segment_ms) # Make sure segment doesn’t run past the 10sec background
13 segment_end = segment_start + segment_ms - 1
14
mtrand.pyx in numpy.random.mtrand.RandomState.randint()
_bounded_integers.pyx in numpy.random._bounded_integers._rand_int64()
ValueError: low >= high