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
def sigmoid_cross_entropy_with_logits(logits, targets, name=None): return ops.SigmoidCrossEntropy([logits, targets], normalization='UNIT', name=None)
def LayerSetup(self, bottom): loss = _ops.SigmoidCrossEntropy(bottom, **self.arguments) if self._loss_weight is not None: loss *= self._loss_weight return loss