Lesson1v2: IndexError: index

Hi All,
I am trying to rerun the lesson 1 code for Dogs and cats data set.As I am following the same steps as mentioned in video, I am getting
IndexError: index 163 is out of bounds for axis 0 with size 1

Any pointers, please…

@Seema I am guessing the following after playing around with the code.

You could have:

probs = np.exp(log_preds[:1])

instead of

probs = np.exp(log_preds[:,1])    

I got a similar error when I removed the comma - this generates a array of 2 numbers instead of 2000 numbers with dtype=float32

Maybe you could compare your notebook code with lesson1.ipynb notebook.


Ho to create a submission for dog’s breed competition?
I had created one but it was a disaster on leaderboard…

1 Like

@sudarsangp, Many thanks for looking into, yep that was the error. :slight_smile:

I have the same problem, Im getting a logloss of 4.122 as the log loss on the leader board