We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4319ca0 commit 1a95c7cCopy full SHA for 1a95c7c
1 file changed
DifferentiationInterface/test/Back/Mooncake/test.jl
@@ -23,3 +23,11 @@ test_differentiation(
23
excluded=SECOND_ORDER,
24
logging=LOGGING,
25
);
26
+
27
+@testset "NamedTuples" begin
28
+ ps = (; A=rand(5), B=rand(5))
29
+ myfun(ps) = sum(ps.A .* ps.B)
30
+ grad = gradient(myfun, backends[1], ps)
31
+ @test grad.A == ps.B
32
+ @test grad.B == ps.A
33
+end
0 commit comments