Skip to content

Conversation

@sdatkinson
Copy link
Owner

Resolves #172

Also add groups_1x1 for WaveNet layers

- Added support for grouped convolutions in the Conv1x1 class by introducing a groups parameter in the constructor.
- Implemented validation checks to ensure in_channels and out_channels are divisible by groups.
- Updated weight initialization and processing methods to handle grouped convolution logic.
- Enhanced the set_weights_ and process methods to accommodate grouped weight organization and processing.
- Added necessary error handling for invalid group configurations.

This update enhances the flexibility of the Conv1x1 layer for various convolutional architectures.
- Included new test cases for the Conv1x1 layer in run_tests.cpp, covering various construction and processing scenarios.
- Tests validate functionality such as construction with groups, input/output channel validation, and processing with and without bias.
- Enhanced test coverage for grouped convolutions, ensuring comprehensive validation of the Conv1x1 layer's capabilities.
- Refactored test cases in test_conv_1x1.cpp to use named constants for input/output channels and bias parameters, improving readability.
- Ensured all assertions for output dimensions are based on the defined constants, enhancing maintainability.
- Updated tests to validate behavior for both basic and grouped convolution scenarios, ensuring comprehensive coverage of the Conv1x1 functionality.
…rouping parameters

- Updated the WaveNet _Layer and _LayerArray constructors to accept new parameters: groups_condition and groups_1x1, enhancing flexibility for grouped convolutions.
- Modified relevant test cases in test_layer, test_layer_array, and test_full to incorporate the new parameters, ensuring comprehensive testing of the updated functionality.
- Ensured backward compatibility by maintaining existing parameter structures while adding new ones for improved configurability.
… grouping parameters

- Removed the groups_condition parameter from the constructors of _Layer and _LayerArray, streamlining the interface for grouped convolutions.
- Updated relevant method calls and test cases to reflect this change, ensuring consistency and clarity in the codebase.
- Maintained backward compatibility by defaulting groups_1x1 to 1 where applicable.
…ps_condition parameter

- Removed the groups_condition parameter from various test cases in test_layer, test_layer_array, test_full, and test_real_time_safe.
- Updated constructor calls for _Layer and _LayerArray to reflect this change, ensuring consistency across tests.
- Enhanced code clarity by streamlining the parameter list in relevant test functions.
- Increased groups_1x1 from 1 to 2 in test_real_time_safe.cpp to support grouped processing.
- Enhanced comments to clarify weight initialization for grouped convolutions, detailing the identity matrix setup for each group.
- Ensured consistency in the test setup for grouped convolution scenarios, improving clarity and maintainability.
@sdatkinson sdatkinson changed the title [FEATURE] Grouped convolutions for Conv1x1 [FEATURE] Grouped convolutions for Conv1x1, WaveNet groups_1x1 hyperparameter Jan 15, 2026
@sdatkinson sdatkinson merged commit e3e5154 into main Jan 15, 2026
1 check passed
@sdatkinson sdatkinson deleted the 172-grouped-1x1 branch January 15, 2026 01:52
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.

Grouped convolutions

2 participants