I don’t know what I should write these lines. Can you help me?
segment_end_y = int(segment_end_ms * Ty / 10000.0)
if segment_end_y < Ty:
# Add 1 to the correct index in the background label (y)
### START CODE HERE ### (≈ 3 lines)
for i in range(1, Ty):
if None < None:
y[0, i] = None
### END CODE HERE ###
Here is the comment line extracted from the function, it provides information on what your code needs to do:
“Update the label vector y. The labels of the 50 output steps strictly after the end of the segment should be set to 1. By strictly we mean that the label of segment_end_y should be 0 while, the 50 following labels should be ones.”
In other words, the ‘for loop’ should be checking the ’ i ’ value form the next time step after segment_end_y , so, that means it must be in range of segment_end_y+1 to segment_end_y+51, and it must be within the number of time steps in the output, Ty. Then, you set the label for that time step to 1.