Strange bug in code

I am training a neural network on kaggle and here’s my code
but as you can see it is running into some problem (particularly line 49)
i search the bug and here’s what i got

actually if i erase line 47,48 i got another error which said cant convert numpy to tensor, it’s weird for me because i have use the same code for another problem (it cant convert numpy to tensor too) and the line 47,48 work perfectly fine for that time but now run into trouble. Can anyone tell me how to fix this ? Thank you for reading

well i have fixed the problem, tensorflow only allow to use labels in range [0,4) but i have used [1,4]

Hello, @cpp219! I am glad to hear that you were able to find a solution. May I ask how you were able to arrive at it?


i just read many ‘not-really-related’ problem and their solution then try all of it

Much effort has been put in.
Well done.

1 Like