Closed jkhouja closed 11 months ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
All modified lines are covered by tests :white_check_mark:
Comparison is base (
1178970
) 96.54% compared to head (5118ee2
) 96.54%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Tests need to pass before we can review. See failures here: https://github.com/pyt-team/TopoModelX/actions/runs/6424391426/job/17444941942?pr=235
@ninamiolane Thank you for taking a look. I was about to tag you and @mhajij for your thoughts. There's a weird issue in can_train tutorial that I've been working on since yesterday.
TLDR. can_layer errors when accessing index of the sparse matrix. So need to call coalesce before that. But then it's causing a matrix dimension mismatch in MultiHeadLiftLayer during training which made me suspicious of something deeper going on:
File [~/workspace/code/TopoModelX/topomodelx/nn/cell/can_layer.py:273](https://file+.vscode-resource.vscode-cdn.net/Users/jkhouja/workspace/code/TopoModelX/tutorials/cell/~/workspace/code/TopoModelX/topomodelx/nn/cell/can_layer.py:273), in MultiHeadLiftLayer.forward(self, x_0, neighborhood_0_to_0, x_1)
271 print(combined_x_1.shape)
272 print(x_1.shape)
--> 273 combined_x_1 = torch.cat(
274 (combined_x_1, x_1), dim=1
275 ) # (num_edges, heads + in_channels_1)
277 return combined_x_1
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 55 but got size 38 for tensor number 1 in the list.
So I'm tracing the source of the issue, identifying the matrix. It's taking me longer since I'm not familiar with CAN architecture. Will keep you posted.
@ninamiolane @mhajij I created a new ticket where I documented the details issue #236
Replaces all sparse torch casting to new method
from_sparse
except in 1 example where there's an issue #236 that's been documented.