Search code examples
computer-visionobject-detectionloss-function

Loss function and Last layer for numeric output


I'm trying to train a convolutional neural network to read the consumption index from a valid picture of a meter. The consumption is an integer that can vary from 0 to 99999. What loss function should I use, what is the appropriate shape for the last layer on the neural network ? Thanks for your help.


Solution

  • It looks like you are doing a regression problem, so usually the output layer for this kind of networks is a simple Dense layer with output shape 1 and linear activation function. As loss function you can use MSE or logcosh