Skip to content

[FIX] Embedding size parameters should be index based on the conv and depth parameters - #760

Merged
bruAristimunha merged 11 commits into
masterfrom
embedding-features
Aug 11, 2025
Merged

[FIX] Embedding size parameters should be index based on the conv and depth parameters#760
bruAristimunha merged 11 commits into
masterfrom
embedding-features

Conversation

@bruAristimunha

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the CTNet model to improve its embedding configuration flexibility by making embedding-related parameters optional and implementing automatic dimension inference.

  • Converts emb_size, n_filters_time, and depth_multiplier parameters to optional with automatic inference when one is missing
  • Adds comprehensive parameter validation and dimension resolution logic
  • Includes a new test to verify models with embedding parameters work correctly with different embedding values

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
braindecode/models/ctnet.py Refactors CTNet to make embedding parameters optional with automatic inference and adds validation logic
test/unit_tests/models/test_integration.py Adds new test function to verify models with embedding parameters work with modified values
docs/whats_new.rst Documents the CTNet parameter fix in the changelog

Comment thread braindecode/models/ctnet.py
Comment thread test/unit_tests/models/test_integration.py Outdated
Comment thread test/unit_tests/models/test_integration.py Outdated
Comment thread braindecode/models/ctnet.py Outdated
bruAristimunha and others added 3 commits August 11, 2025 12:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bruAristimunha bruAristimunha changed the title Updating the CTNet [FIX] Embedding size parameters should be index based on the conv and depth parameters Aug 11, 2025
@bruAristimunha
bruAristimunha merged commit 38b8a3e into master Aug 11, 2025
16 checks passed
@bruAristimunha
bruAristimunha deleted the embedding-features branch August 11, 2025 11:22
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.

CTNet: RuntimeError: The size of tensor a (40) must match the size of tensor b (256) at non-singleton dimension 2

2 participants