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
Unify keyword argument names for convolution and pooling #207
Comments
how about copying Caffe and using |
Sounds like a good compromise. And I suppose having them be consistent across dimensionalities makes the interface a bit 'smaller', so I'm in favour. Having all of them accept both tuples and single integers is also a great idea, and shouldn't be too complicated to implement cleanly.
|
Maybe we could have a helper function that takes an integer or tuple as input, as well as the desired dimensionality. If the first input is a tuple, it checks if it has the right length and simply returns it. If the first input is an integer, it turns it into a tuple of the correct length. This could be used in both the pooling and the convolution implementations. |
yeah, I did something like that here but it would be a good helper function. |
I like @ebenolson's approach of accepting any iterable, not just tuples. We could do that in more places. (But that's something we can always add later on, as it doesn't break backwards compatibility.) And speaking of helper functions, there's a lot more code duplication in the convolution layers that could use some refactoring, but that's also not critical for the first release. Anyone please feel free to rename the keyword arguments as discussed above and/or add the integer/tuple handling, I'm currently spending the little Lasagne time I have on #182. It's a low-hanging fruit we can leave open for a bit until somebody comes a long and picks it. If you're a possible new contributor reading this, please step closer :) |
I wouldn't leave this open for more than a couple of days though, |
I can take care of this. Do we want people's code to break now, or continue to accept the old parameter names and give a deprecation warning? |
Thinking about it again, adding deprecation warnings for this is going to clutter the code a lot, and it would only be for a few weeks anyway. I don't think it's necessary to spend time on that. We'll post a bulletin on the mailing list when it's released. |
The keyword argument names for 1D and {2,3}D convolution and pooling are currently not the same.
filter_length
andstride
filter_size
andstrides
ds
andst
in Add support for striding and padding to pooling layers #199I'd suggest to use
filter_size
andstride
for all convolutions, andpool_size
andstride
for all poolings.For a really uniform interface, it would be nice if all of
filter_size
,pool_size
andstride
either accepted a single integer or a tuple of integers matching the dimensionality.Arguments for or against it?
The text was updated successfully, but these errors were encountered: