-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement grouped convolutions (#116)
* Add groups_of template parameter * Add test data for grouped convolutions * Fix data generation script * Initial working version for grouped convolutions * Specialize forward method when groups_of is 1 * Remove extra stuff in CMakeLists.txt * Clean up conv1d.h * Restore conditional for dynamic state * Test different configuration * Merge column copying logic * Implement microtcn layer in PyTorch * Try to implement microtcn * Make first half of microtcn work * Add more group tests * Add .venv to gitignore * New definition for causal_crop This definition makes it so that an apparent off-by-one error is fixed by instead making the `start` index be the difference between the target and the current length. For example, given a tensor with 1000 elements, and a target of 970, the function would instead crop with `x[..., 30:]`, rather than the previous behaviour of `x[..., 29:999]`. This seems to be more correct in that the previous behaviour takes items from index 29 (inclusive) to index 999 (exclusive, so 998). Meanwhile, the new behaviour makes it so that it's index 30 (inclusive) until the end, which is the index 999. * TCNBlock works!!! * Fix loadLayer to use groups_of * Bring back old tests * Add groups_of template parameter * Add test data for grouped convolutions * Fix data generation script * Initial working version for grouped convolutions * Specialize forward method when groups_of is 1 * Remove extra stuff in CMakeLists.txt * Clean up conv1d.h * Restore conditional for dynamic state * Test different configuration * Merge column copying logic * Implement microtcn layer in PyTorch * Try to implement microtcn * Make first half of microtcn work * Add more group tests * Add .venv to gitignore * New definition for causal_crop This definition makes it so that an apparent off-by-one error is fixed by instead making the `start` index be the difference between the target and the current length. For example, given a tensor with 1000 elements, and a target of 970, the function would instead crop with `x[..., 30:]`, rather than the previous behaviour of `x[..., 29:999]`. This seems to be more correct in that the previous behaviour takes items from index 29 (inclusive) to index 999 (exclusive, so 998). Meanwhile, the new behaviour makes it so that it's index 30 (inclusive) until the end, which is the index 999. * TCNBlock works!!! * Fix loadLayer to use groups_of * Bring back old tests * Tweaks for testing code * Fixes, Conv1D with groups works for everything except Eigen backend * Adding Eigen implementation and fixing channel indexing * Re-add groups test * Bring back MicroTCN test * Rename groups_of -> groups * Also rename groups_of -> groups --------- Co-authored-by: jatin <[email protected]>
- Loading branch information
1 parent
6a2b7b8
commit 1e81449
Showing
38 changed files
with
2,922 additions
and
485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ __pycache__ | |
/docs | ||
.DS_Store | ||
/.idea | ||
/.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.