C5 W3 A2 E3 create_training_example

I’m still having a hard time figuring out on how to assign the “y” labels

Insert labels in “y” at segment_end

The template line: " y = None"
seems to imply that the whole of y is reassigned at each step in the for loop. But I’m not sure with what. I tried to assign y[0,abc] = 1, where abc was one of several options (segment_end, random_indices, random_activate, etc.) but nothing worked. With y[0,segment_end] = 1, I get an error: index 3793 is out of bounds for axis 1 with size 1375

Any help would be greatly appreciated.

Use your “insert_ones(…)” function.

1 Like

Ah…thank you. That helped.