Skip to content

Commit

Permalink
Using torch.nn.ModuleList
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellsegga committed Jun 27, 2023
1 parent e1eb3d9 commit 5382ee0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion topomodelx/nn/simplicial/snn_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ def __init__(self, in_channels, out_channels, K):
self.out_channels = out_channels
self.K = K

self.convs = [
convs = [
Conv(in_channels=in_channels, out_channels=out_channels, update_func="relu")
for _ in range(self.K)
]

self.convs = torch.nn.ModuleList(convs)

self.aggr = Aggregation(aggr_func="sum", update_func="relu")

def reset_parameters(self):
Expand Down

0 comments on commit 5382ee0

Please sign in to comment.