An in-depth explanation of differentiable programming, for programmers
> Note that we now have an explicit representation of this graph as a result of the forward pass, for >this example Add(Scale(2.0, Var(0)), Scale(3.0, Var(1))).
Shouldn’t it be ‘ Add(Scale(2.0, Var(1)), Scale(3.0, Var(1)))’ instead?
Great article btw. Thanks!
Thanks for the compliment, and for reading carefullly!
> Shouldn’t it be ‘ Add(Scale(2.0, Var(1)), Scale(3.0, Var(1)))’ instead?
I don't think so. As you can see in the snippet just above, x is Var(0) and y is Var(1).
```
let dual_delta = f(
&Dual::new(x, Rc::new(Delta::Var(0))),
&Dual::new(y, Rc::new(Delta::Var(1))),
);
> Note that we now have an explicit representation of this graph as a result of the forward pass, for >this example Add(Scale(2.0, Var(0)), Scale(3.0, Var(1))).
Shouldn’t it be ‘ Add(Scale(2.0, Var(1)), Scale(3.0, Var(1)))’ instead?
Great article btw. Thanks!
Thanks for the compliment, and for reading carefullly!
> Shouldn’t it be ‘ Add(Scale(2.0, Var(1)), Scale(3.0, Var(1)))’ instead?
I don't think so. As you can see in the snippet just above, x is Var(0) and y is Var(1).
```
let dual_delta = f(
&Dual::new(x, Rc::new(Delta::Var(0))),
&Dual::new(y, Rc::new(Delta::Var(1))),
);
```