-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
CrossCor layer #762
CrossCor layer #762
Conversation
src/layers/conv.jl
Outdated
@@ -199,6 +199,66 @@ end | |||
(a::DepthwiseConv{<:Any,<:Any,W})(x::AbstractArray{<:Real}) where {T <: Union{Float32,Float64}, W <: AbstractArray{T}} = | |||
a(T.(x)) | |||
|
|||
""" |
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.
Formatting is off here
@@ -36,6 +36,10 @@ c = gpu(Conv((2,2),3=>4)) | |||
l = c(gpu(rand(10,10,3,2))) | |||
Flux.back!(sum(l)) | |||
|
|||
c = gpu(CrossCor((2,2),3=>4)) | |||
l = c(gpu(rand(10,10,3,2))) | |||
Flux.back!(sum(l)) |
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.
Would be nice to have some numerical tests here, e.g. comparing to a regular convolution. Also, let's have a news item for this.
Not to get ahead of myself, we'll need a News item. |
bors try |
tryMerge conflict |
Could you do a quick conflict resolve? |
Done! |
bors try |
tryBuild succeeded |
Could we add the numerical tests that @MikeInnes mentioned? |
I've added a small test, anything specific I should add there? |
@ayush-1506 A comparison between cross_correlation and convolution, checking the fact that both are equivalent once the weights are flipped, would be a good check IMO. |
We need to assert that what we are emitting is in fact the correct output. I think @avik-pal s test sounds reasonable. |
Can we also link @avik-pal once the docs are updated, if you're happy with the tests here go ahead and merge with bors. |
bors r+ |
Build succeeded |
Thanks @ayush-1506! |
Same as #423 (which couldn't be edited since I lost access to that github account).