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

Fixing type ambiguity of unbroadcast #1185

Merged
merged 2 commits into from
Mar 16, 2022

Conversation

SebastianAment
Copy link
Contributor

Fixing #1184.

@mcabbott
Copy link
Member

Looks good.

Is it easy to trigger this problem? Would be nice to have a test, ideally calling gradient of something.

@SebastianAment
Copy link
Contributor Author

Great, I just came up with this:

using Zygote
n, d = 128, 3
x = [randn(d) for _ in 1:n]

f = sin
g(x) = sum.((f,), x)
h(x) = sum(abs2, g(x))
gradient(h, x)

Which triggers the error. Will add it to the testing suite.

@SebastianAment
Copy link
Contributor Author

I think this is ready to be merged.

Copy link
Member

@ToucheSir ToucheSir left a comment

Choose a reason for hiding this comment

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

Thanks!

@ToucheSir ToucheSir merged commit a133200 into FluxML:master Mar 16, 2022
@SebastianAment SebastianAment deleted the unbroadcast-ambiguity branch March 16, 2022 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants