-
Notifications
You must be signed in to change notification settings - Fork 463
For encoded convolution, add check for when min_width would have been larger than in_width #610
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
For encoded convolution, add check for when min_width would have been larger than in_width #610
Conversation
This has been tested for 1D, and could be merged in the more restricted sense, but it has not been tested for 2D. I think planning should take into account the future of encoded. |
I will restrict this PR to the 1D case because I think that's the only one that would be important. If we fix it for 2D, we can make a different PR. |
There are some issues still, so I am converting to a draft till I get a chance to look. |
This should now also fix the same issue with Conv2D. |
@vloncar, are you happy with the changes here as they are? |
Is there anything left to do here before it's merged? |
… larger than in_width (fastmachinelearning#610) * add special case when W == min_width. * add test that fails without this fix * add comments * Make simple bug fixes before reworking structure * Try to cleanup how we handle the narrow convolutions * fix hardcoded returns * update convolution templates for narrow encoded * flake8 formatting * update narrow for conv2d, fix test * change narrow to unscaled, always do unscaled when in_W == min_W * pre-commit fixes for nnet_conv1d_stream.h and nnet_conv2d_stream.h * remove unneeded attributes * change hardcoded instructions condition
Description
In the encoded convolution, the case when the in_width is smaller than the nominal min_width needs to be handled as a special case. This attempts to fix this situation. It has been been minimally tested in a conv1d case where in_width = 11 while the kernel width is 9. Additional tests need to be made.
Type of change
For a new feature or function, please create an issue first to discuss it
with us before submitting a pull request.
Note: Please delete options that are not relevant.
Tests
test_conv1d_narrow.py
fails in main, but passes after this fix. Similarly withtest_conv2d_narrow.py
.Checklist