[Solution] IndexError: list index out of range

Recently, I followed the boss to read the cifar data set.

Boss's program

my program

 

Boss’s running results

My running results


I obviously copied the correct answer, but I got zero points. . .

After searching online for a long time, it said that my data set is empty and I need to add a try:. . . Barabara

Later, I used stepper to read the program and suddenly discovered that

The folder displayed in my Run area is like this (note the direction and number of slashes)

The folders displayed step by step are like this

In this way, the result is obvious,

It's because the direction and number of slashes don't match up!

Changed my program

operation result

success! ! ! !

Guess you like

Origin blog.csdn.net/azheng02/article/details/129918289