Lesson1v2: IndexError: index


(Seema Goel) #1

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…


(Sudarsan Padmanabhan) #2

@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
image

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


(Aditya) #3

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


(Seema Goel) #4

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


(kumar kaushik) #5

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