public SigmoidCrossEntropyLoss(SameDiff sameDiff, SDVariable logits, SDVariable weights, SDVariable labels, int reductionMode, double labelSmoothing) { super(null, sameDiff, new SDVariable[]{logits, weights, labels}, false); this.reductionMode = reductionMode; this.labelSmoothing = labelSmoothing; this.sameDiff = sameDiff; addArgs(); }
@Override public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map<String, AttrValue> attributesForNode, GraphDef graph) { TFGraphMapper.getInstance().initFunctionFromProperties(nodeDef.getOp(), this, attributesForNode, nodeDef, graph); addArgs(); }