fn
bce_with_logits_op
→TensorImplPtrint bce_with_logits_op(const int & input, const int & target, const int & weight, const int & pos_weight, int reduction)Public BCE-with-logits entry point.
Parameters
inputTensorImplPtrRaw logits (any real value).
targetTensorImplPtrBinary targets in of the same shape.
weightTensorImplPtrPer-element weighting tensor.
pos_weightTensorImplPtrPositive-class re-weighting; pass a ones tensor when unused.
reductionint0 (None), 1 (Mean), or 2 (Sum).Returns
TensorImplPtrReduced or per-element loss tensor.