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

Scalar pad and stride #237

Merged
merged 6 commits into from
Jun 26, 2018
Merged

Scalar pad and stride #237

merged 6 commits into from
Jun 26, 2018

Conversation

tejank10
Copy link
Contributor

This is regarding issue #235 . Added support for scalar pad and stride, along with existing tuple pad and stride.

@tejank10 tejank10 changed the title Scalar pad stride Scalar pad and stride Apr 15, 2018
@@ -25,10 +28,9 @@ Conv(w::AbstractArray{T}, b::AbstractVector{T}, σ = identity;
Conv(σ, w, b, stride, pad)
Copy link
Member

Choose a reason for hiding this comment

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

Better if the call to expand goes here, I think.

@MikeInnes
Copy link
Member

Great – can you add the same functionality to maxpool and meanpool in NNlib as well?

@tejank10
Copy link
Contributor Author

Yeah, sure. I'll do that.

Conv(param(init(k..., ch...)), param(zeros(ch[2])), σ,
stride = stride, pad = pad)
stride = expand(Val{N}, stride), pad = expand(Val{N}, pad))
Copy link
Member

Choose a reason for hiding this comment

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

You can remove this now since it just forwards to the more basic constructor

@MikeInnes MikeInnes merged commit 134ac15 into FluxML:master Jun 26, 2018
@MikeInnes
Copy link
Member

Thanks @tejank10!

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.

2 participants