How to keep the output of the Network in the value range?

How to keep the output of the neural network in the value range e.g. 0-1?
My network generates values at the beginning between 0-1 and later 1-50