Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with test_reset_parameters() in test_hsn_layer.py #140

Open
pavlo-melnyk opened this issue Jul 11, 2023 · 0 comments
Open

Problem with test_reset_parameters() in test_hsn_layer.py #140

pavlo-melnyk opened this issue Jul 11, 2023 · 0 comments

Comments

@pavlo-melnyk
Copy link
Contributor

Hi!

In test_reset_parameters()

if isinstance(module, torch.nn.Conv2d):
, the HSNLayer modules are checked to be instances of torch.nn.Conv2d. However, none of them are, since the layer consists of only Aggregation (from topomodelx.base.aggregation) and Conv from (topomodelx.base.conv).

Thus, the test will be passed without actually checking the parameter reset.

(The test itself is incorrect: after resetting, the parameters of a torch.nn.Conv2d layer are compared to zeros

module.weight, torch.zeros_like(module.weight)
, which is not how they are initialized.)

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

No branches or pull requests

1 participant