IndexError: Tuple index out of scope


#1

Hello,

Wanted to follow the video abount Classification CIFAR-10, with my own dataset. I could load my dataset withous any problem, but while creating the model, i get at the end of the process the message “Tuple index out of scope”, and I find no solution.
Somebody has an idea?
Thank you

Lyranis


#2

Ok, I found the problem. Had two inputs and no outputs in my data set!
I now have a other errror message:

“Output dimensions does not match with the provided data output shape”

Any idea?
Thank’s

Lyranis


#3

Can you share snapshot of data tab and model tab ?


#4

Hello,

Of course.
screenshot%20dataset

Note that I had to select the values “categorical-2” and “OuputPort0” from hand. These were not auto-recognize.

Some of my dataset train.cvs file:
Image,Rating
Bai/img(1).jpg,1
Bai/img(2).jpg,1
Bai/img(3).jpg,1
Bai/img(4).jpg,1
Bai/img(5).jpg,1
Bai/img(6).jpg,1
Bai/img(7).jpg,1
Bai/img(8).jpg,1
Bai/img(9).jpg,1
Bai/img(10).jpg,1
Bai/img(11).jpg,1
Bai/img(12).jpg,1
Bai/img(13).jpg,1
Bai/img(14).jpg,1
Bai/img(15).jpg,1
Bai/img(16).jpg,1
Bai/img(17).jpg,1
Bai/img(18).jpg,1
BeauPied/img(1).jpg,2
BeauPied/img(2).jpg,2
BeauPied/img(3).jpg,2
BeauPied/img(4).jpg,2
BeauPied/img(5).jpg,2
BeauPied/img(6).jpg,2
BeauPied/img(7).jpg,2
BeauPied/img(8).jpg,2
BeauPied/img(9).jpg,2
BeauPied/img(10).jpg,2
BeauPied/img(11).jpg,2


#5

and a screenshot of my model:
screenshot%20model

Thank you!


#6

Since you have 2 categories, you should change output dimensions of Desne_2 layer to 2 (select Dense_2 to see its options)


#7

Thank you very much I’ll try it and give a feedback :blush:


#8

Hello Rajendra,

It was exactly what you expected :slight_smile:
Thank’s a lot for your help!

Lyranis


#9

Hi,

I have one last problem. Traning stop before end of process with following message:
“output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None”.
Has this problem somethink to do with the last one?
Thanks

Lyranis


#10

Ok I think I found the problem: my pictures had all different resolutions (sizes). If I set all to the same size, i.e 64x64, it work fine. I now have to find the best params and picture resolution to get the best results with the min. training time :-).


#11

This worked for me - thanks!