mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-24 09:21:16 +08:00
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 bc10a17534
.
* Rename df2dx2 to d2fdx2
This commit is contained in:
parent
ff4223904d
commit
e7f9710499
@ -89,8 +89,8 @@ void automatic_differentiation() {
|
|||||||
// dfdx is 2 * x
|
// dfdx is 2 * x
|
||||||
|
|
||||||
// Get the second derivative by composing grad with grad
|
// Get the second derivative by composing grad with grad
|
||||||
auto df2dx2 = grad(grad(fn))(x);
|
auto d2fdx2 = grad(grad(fn))(x);
|
||||||
// df2dx2 is 2
|
// d2fdx2 is 2
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user