operator * method

dynamic operator *(
  1. Object other
)

Implementation

operator *(Object other) {
  final effectiveOther = _fromObject(other);

  final out = Value(data * effectiveOther.data, {
    this,
    effectiveOther,
  }, ValueOperation.multiply);

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

  return out;
}