Skip to content

Fix scatter_add bug in SETLayer.forward#4

Open
7iW wants to merge 1 commit intoAlliedToasters:masterfrom
7iW:develop
Open

Fix scatter_add bug in SETLayer.forward#4
7iW wants to merge 1 commit intoAlliedToasters:masterfrom
7iW:develop

Conversation

@7iW
Copy link

@7iW 7iW commented Jan 27, 2020

A bug in scatter_add could cause a dimension mismatch in the return z + self.bias line of SETLayer.forward. The call scatter_add(k, self.inds_out) produces a tensor of length max(self.inds_out)+1, which might not be equal to self.outdim. This commit fixes this issue by using the dim_size keyword of the scatter_add function.

A bug in scatter_add could cause a dimension mismatch in the `return z + self.bias`  line of `SETLayer.forward`. The call `scatter_add(k, self.inds_out)` produces a tensor of length `max(self.inds_out)+1`, which might not be equal to `self.outdim`. This commit fixes this issue by using the `dim_size` keyword of the `scatter_add` function.
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