operator * method

Value operator *(
  1. Value other
)

Implementation

Value operator *(Value other) {
  final out = Value(value * other.value);

  out._backward = () {
    //x=a * b
    //dx/da=b
    //dyx/b=a
    //dy/da=dy/dx*dx/da=
    out.gradient += gradient * other.gradient;
    other.gradient += other.gradient * gradient;
  };
  out.children.add(other);

  return out;
}