TopoModelX icon indicating copy to clipboard operation
TopoModelX copied to clipboard

`Dist2Cycle` never calls `Dist2CycleLayer`s

Open ffl096 opened this issue 2 years ago • 5 comments

While Dist2CycleLayers are correctly constructed in Dist2Cyle, they are never actually called.

  • [ ] Correctly call layers in the forward method.
  • [ ] This should have been catched by tests. Fix them!

ffl096 avatar Sep 22 '23 10:09 ffl096

what is the update on this issue @maneelusf ?

mhajij avatar Oct 06 '23 04:10 mhajij

Hi @mhajij , I have looked at the code and it looks like a simple calling of the Distlayer does not resolve things. Something on the below lines did not fix it.

from topomodelx.nn.simplicial.dist2cycle_layer import Dist2CycleLayer
for _ in range(n_layers):
            layers.append(
                Dist2CycleLayer(
                    channels=channels,
                )
            )
for layer in layers:
    x_1e = layer(x_1e,incidence_0,adjacency_0)

This means that we have to go through the Dist2Cycle paper once again and look through its implementation(https://github.com/alexdkeros/Dist2Cycle) to understand the changes.

maneelusf avatar Oct 06 '23 04:10 maneelusf

@maneelusf any update on this?

ninamiolane avatar Oct 26 '23 14:10 ninamiolane

Hi @ninamiolane , did not have the time to work on this last month due to other commitments. This bug requires a deep dive into the original implementation.(https://github.com/alexdkeros/Dist2Cycle). Will work on this and keep you updated on this by this Monday.

maneelusf avatar Oct 26 '23 15:10 maneelusf

Hey! Working on the tutorial checks I realized there was a bug in Dist2CycleLayer when defining the dimensions of the self.fc_neigh. I made Dist2Cycle work with multiple layers by changing the output dimension of self.fc_neigh to be compatible with chanels dim.

However, even though now the model can be executed without errors (currently in the simplicial_checks branch), I agree that it would be nice to double check the implementation of this model.

gbg141 avatar Nov 04 '23 18:11 gbg141