Fix typo in a variable name in example code. (#1104)
* Fix typo in a variable name in example code. * Rename df2dx2 to d2fdx2 - the appropriate naming for the second derivative * Update CONTRIBUTING.md - add needed python packages, and a virtual-env hint * Revert "Fix typo in a variable name in example code." This reverts commit bc10a175345c3e20eab689c47f7d866073a3c233. * Rename df2dx2 to d2fdx2
This commit is contained in:
@@ -89,8 +89,8 @@ void automatic_differentiation() {
|
||||
// dfdx is 2 * x
|
||||
|
||||
// Get the second derivative by composing grad with grad
|
||||
auto df2dx2 = grad(grad(fn))(x);
|
||||
// df2dx2 is 2
|
||||
auto d2fdx2 = grad(grad(fn))(x);
|
||||
// d2fdx2 is 2
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
Reference in New Issue
Block a user