Skip to content

Commit

Permalink
Add rule for (not) generating tangents for vector spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Jul 2, 2024
1 parent 7cc0d32 commit b0e8230
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/ad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ end
function ChainRulesTestUtils.rand_tangent(rng::AbstractRNG, x::AbstractTensorMap)
return TensorMap(randn, scalartype(x), space(x))
end
ChainRulesTestUtils.rand_tangent(::AbstractRNG, ::VectorSpace) = NoTangent()
function ChainRulesTestUtils.test_approx(actual::AbstractTensorMap,
expected::AbstractTensorMap, msg=""; kwargs...)
for (c, b) in blocks(actual)
Expand Down

0 comments on commit b0e8230

Please sign in to comment.