How to restrict output of a neural net to a specific range?
Normalize your outputs so they are in the range 0, 1. Make sure your normalization function lets you transform them back later.
The sigmoid activation function always outputs between 0, 1. Just make sure your last layer has sigmoid activation to restrict your output into that range. Now you can take your outputs and transform them back into the range you wanted.
You could also look into writing your own activation function to transform your data.
I'm using Keras for a regression task and want to restrict my output to a range (say between 1 and 10)
Is there a way to ensure this?