Tensorflow : logits and labels must have the same first dimension

前端 未结 5 2228
迷失自我
迷失自我 2020-12-16 03:13

I am new in tensoflow and I want to adapt the MNIST tutorial https://www.tensorflow.org/tutorials/layers with my own data (images of 40x40). This is my model function :

5条回答
  •  孤城傲影
    2020-12-16 03:59

    I resolved it changing from sparse_categorical_crossentropy to categorical_crossentropy and is now running fine.

提交回复
热议问题