Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Use
ProjectTo
in broadcasting &gradient
#1044Use
ProjectTo
in broadcasting &gradient
#1044Changes from all commits
050ea52
a416263
ac1281b
0bb31c2
d087bbe
d7ce02f
f353ae2
48fbfcc
a826092
91fc91f
d905c3d
fbebbe9
502d85d
361d047
b621330
3e3e16e
ea54df7
ff5f20e
8599e1b
27e52b2
ff9aacf
5bf5342
e9ea88a
0013fd3
c07ae9f
7ff1159
6549c57
298f119
e3922a9
a2814ae
08f8c46
c8bc588
5080490
1b37161
4c08118
7197491
dde922b
1c07a7c
35280d5
80123a1
3bc2e09
02397b5
a3e3a97
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add a method to
_project
and avoid this changeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you write exactly what method that would be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like
_project(x, ::Nothing) = nothing
maybeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is easy to try:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think doing this makes unbroadcast less generic, we don't need to define projections here afaict. Let's retain the current definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What case exactly is not handled, if this is less generic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It restricts it to what can be handled by
_project
as opposed to simple sizes and lengths of arrays.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those are broadly the same now, as of recent changes.
_project
will never method error now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that before CRC changes,
_project
had extra methods to handle other cases.