Skip to content

Conversation

@ayushrajdahal
Copy link

Properly calculate total input size by using hidden_size for embedded variables and original size for non-embedded variables.

Checklist before merging this PR:

  • Mentioned all issues that this PR fixes or addresses.
  • Summarized the updates of this PR under Summary.
  • Added an entry under Unreleased in the Changelog.

Fixes #2817 .

Summary

Fixed a bug in the input_size_total property of _VariableSelectionNetwork where the conditional expression size if name in self.input_embedding_flags else size was always returning size regardless of the condition.

The corrected implementation now properly calculates the total input size by:

  • Using hidden_size for embedded (categorical) variables
  • Using the original size for non-embedded (continuous) variables

Other Information

This bug would have caused incorrect tensor dimensions when mixing embedded and non-embedded variables, potentially leading to runtime errors.

Properly calculate total input size by using hidden_size for embedded variables and original size for non-embedded variables.

Fixes unit8co#2817
Update changelog to reference correct pull request ID for
VariableSelectionNetwork input_size_total bug fix.
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.

Needs clarification on self.input_size_total of _VariableSelectionNetwork

2 participants