Skip to content

Enforce integer type on counting tensor for mean aggregation#10624

Open
Shono1 wants to merge 1 commit intopyg-team:masterfrom
wpi-automata:enforce-int-count
Open

Enforce integer type on counting tensor for mean aggregation#10624
Shono1 wants to merge 1 commit intopyg-team:masterfrom
wpi-automata:enforce-int-count

Conversation

@Shono1
Copy link

@Shono1 Shono1 commented Feb 27, 2026

Attempting to use mean aggregation with complex-valued node features leads to a crash. This occurs because the tensor storing the "denominator" for the mean calculation (count) inherits the type of the node encodings. The program crashes when clamp is called on count, as clamp is (correctly) incompatible with complex numbers.

Count should really be an integer in all cases, so in this pull request I enforce that by explicitly setting the dtype when creating the tensor of zeros from src, and in creating the tensor of ones from src that gets added to it.

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.

1 participant