'How to clip tensorflow model predictions to a range?

I am using the tensorflow website's tutorial for time series modeling on my own data. The models are pretty good, but my target value is always positive and sometimes the model predicts a negative value. Is there a way to clip the model predictions to a range?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source