NaN loss when training regression network

后端 未结 17 2335
渐次进展
渐次进展 2020-11-29 16:28

I have a data matrix in \"one-hot encoding\" (all ones and zeros) with 260,000 rows and 35 columns. I am using Keras to train a simple neural network to predict a continuou

17条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 16:30

    Was getting NaN for my classification network. Answering here as it might help someone.

    Had made a blunder -

    Number of classes in training labels was 5. i.e. from 0 to 4.

    In the last dense layer of classification had 4 nodes which means 4 classes which is the issue.

    Chaging the number of nodes in the last layer of network to 5 solved the issue for me.

提交回复
热议问题