Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve test for Diagonal constructor #481

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

improve test for Diagonal constructor #481

wants to merge 1 commit into from

Conversation

mzgubic
Copy link
Member

@mzgubic mzgubic commented Jul 28, 2021

No description provided.

@github-actions github-actions bot added the needs version bump Version needs to be incremented or set to -DEV in Project.toml label Jul 28, 2021
@test pb(10*res) == (NoTangent(), [10, 40])
comp = Tangent{typeof(res)}(; diag=10*res.diag) # this is the structure of Diagonal
@test pb(comp) == (NoTangent(), [10, 40])
test_rrule(typeof(D), randn(N); output_tangent=T)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and above, might be worth testing with matrix input too:

Suggested change
test_rrule(typeof(D), randn(N); output_tangent=T)
test_rrule(typeof(D), randn(N); output_tangent=T)
test_rrule(typeof(D), randn(N, N); output_tangent=T)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs version bump Version needs to be incremented or set to -DEV in Project.toml
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants