operator - method

dynamic operator -(
  1. Object other
)

Implementation

operator -(Object other) {
  final effectiveOther = _fromObject(other);
  final out = Value(data - effectiveOther.data, {
    this,
    effectiveOther,
  }, ValueOperation.subtract);

  out.localBackward = () {
    grad += out.grad;
    effectiveOther.grad -= out.grad;
  };

  return out;
}