Skip to content

Commit

Permalink
extra example for basic gradients
Browse files Browse the repository at this point in the history
  • Loading branch information
lecopivo committed Sep 4, 2023
1 parent 9a832a7 commit 92ca574
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/basic_gradients.lean
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ example
by
(conv => lhs; autodiff)

example
: (∇ (x : K ^ Idx 10), ∑ i, x[i])
=
fun x => ⊞ i => (1:K) :=
by
(conv => lhs; autodiff)

example
: (∇ (x : Fin 10 → K), ∑ i, ‖x i‖₂²)
=
Expand All @@ -82,4 +89,3 @@ example (A : Fin 5 → Fin 10 → K)
by
(conv => lhs; autodiff)


0 comments on commit 92ca574

Please sign in to comment.