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

∇conv_filter seems broken #69

Closed
Keno opened this issue Sep 28, 2018 · 2 comments
Closed

∇conv_filter seems broken #69

Keno opened this issue Sep 28, 2018 · 2 comments

Comments

@Keno
Copy link
Contributor

Keno commented Sep 28, 2018

I was validating my XLA implementation of the NNlib functions against the provided implemenations and failed to do so for ∇conv_filter. Upon closer inspecting, ∇conv_filter seems quite broken:

julia> f(dy, input, kernel) = NNlib.∇conv_filter(dy, input, kernel; pad=(0,0), stride=(1,1), dilation=(1,1))
f (generic function with 2 methods)

julia> f(Float32.(reshape(a, (2,2,1,1))), reshape(Float32[1.], (1,1,1,1)), Float32.(A))
2×2×1×1 Array{Float32,4}:
[:, :, 1, 1] =
 3.68136e-32  5.44964e-32
 3.68189e-32  4.54e-33

julia> f(Float32.(reshape(a, (2,2,1,1))), reshape(Float32[1.], (1,1,1,1)), Float32.(A))
2×2×1×1 Array{Float32,4}:
[:, :, 1, 1] =
 1.55684e-41  1.55684e-41
 1.55684e-41  1.55544e-42

(notice the values changing so something is reading uninitialized memory).

@tejank10
Copy link
Contributor

What should be the correct output in this case? Since with kernel size of (2, 2, 1, 1) and input size of (1, 1, 1, 1), it is expected that dy won't be of size (2, 2, 1, 1). So it should be throwing a dimension mismatch error, right?

@staticfloat
Copy link
Contributor

Fixed by #94

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

No branches or pull requests

3 participants