You may be trying to compute log(0) or something close to it. On Monday, March 6, 2017 at 8:36:58 AM UTC-6, Onkar Pandit wrote: > > Hi All, > > I want to modify loss function to tackle class imbalance problem. For this > I am trying to penalize the loss function in following way; > > def binary_ce(output,target): > > penalty = 50 > return -(target * tensor.log(output) *penalty + (1.0 - target) * > tensor.log(1 - output)) > > > But, I am getting loss value as nan.... > > > Can anyone please explain what am I missing ? > > > Thanks for your patience. > > > Thanks and Regards, > > Onkar > >
-- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
