Example #1
0
 def Setup(self, bottom):
     super(SigmoidCrossEntropyLossLayer, self).Setup(bottom)
     loss = ops.SigmoidCrossEntropy(bottom, **self._param)
     if self._loss_weight is not None: loss *= self._loss_weight
     return loss
Example #2
0
def sigmoid_cross_entropy_with_logits(logits, targets, name=None):

    return ops.SigmoidCrossEntropy([logits, targets],
                                   normalization='UNIT',
                                   name=None)
Example #3
0
File: loss.py Project: yyaqi/Dragon
 def LayerSetup(self, bottom):
     loss = _ops.SigmoidCrossEntropy(bottom, **self.arguments)
     if self._loss_weight is not None: loss *= self._loss_weight
     return loss