I see!! This is true hahahahah I didn’t have that idea. Thanks! 
I was thinking about this…
I used RELU at the end of the network to avoid negative values, since the log() of negative values results in nan. However, using RELU, many values in the feature maps go to zero and the log() of zero results in -inf. I avoided one issue and reach another.
Is there any way that I can apply the log() to negative numbers?
Is it normal negative values to appear in the feature maps?
Best regards,
Matheus Santos.