Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

ValueError: Shapes (None, 1) and (None, 11) are incompatible keras

#Sam Ayo answers .. linkedin.com/in/sam-ayo
If you use one-hot-encoded for the label/classes like [0, 0, 0, 0, 0, 0, 1]
you need to use categorical_crossentropy
but if you use sparse label/classes like [1, 2, 3, 4, 5, 6, 7]
you need to use sparse_categorical_crossentropy.
 
PREVIOUS NEXT
Tagged: #Shapes #incompatible #keras
ADD COMMENT
Topic
Name
3+3 =