Solved by KFrank in post #2 
              
              
                Hello Yong Kuk! 

The most straightforward way to do this (and also better for numerical 
reasons) is to adjust your network so that it outputs raw-score logits 
for its predictions, rather than probabilities.  (For example, if the last 
layer of your network is a Sigmoid – that converts a logit to …