How to make a neural network output a specific number out of a certain range? I have a neural network with an Input layer, 2 hidden Dense layers and an Output layer.
I would like for each neuron in the Output layer to give me a number between 0 and 2 (either 0, 1 or 2), like so:

If I use a neuron for each possibility (a neuron for 0, a neuron for 1 and another for 2) and then pick the one with the best prediction, the output layer length would be far too much.
Is there a way to implement this ? (I am fairly new to neural networks and the like)
There are two ways to do that:

Scale your output data from [0, 2] to [0, 1] and apply Sigmoid activation at the end.

Make your own custom activation function that output everything in [0, 2]


I strongly suggest you no. 1, it's way faster to implement.