Solved by KFrank in post #4 
              
              
                Hi Wjk! 

Yes, this is a sensible thing to do. 
This could also be an appropriate use case for torch.clamp(). 
Note, however, you should only be doing this if the result you are forcing 
to be <= 1.0 should already be mathematically no greater than 1.0, and 
only exceed 1.0 because of round-off erro…