Skip to content

Commit

Permalink
update GNA model parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
YingtongDou committed Dec 19, 2023
1 parent d1954f3 commit 090d7db
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pygod/nn/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class GNA(nn.Module):
Parameters
----------
in_dim : int
in_channels : int
Input dimension of node features.
hid_dim : int
hidden_channels : int
Hidden dimension of the model.
num_layers : int
Number of layers in the model.
out_dim : int
out_channels : int
Output dimension of the model.
dropout : float, optional
Dropout rate. Default: ``0.``.
Expand All @@ -32,19 +32,19 @@ class GNA(nn.Module):
Default: ``torch.nn.functional.relu``.
"""
def __init__(self,
in_dim,
hid_dim,
in_channels,
hidden_channels,
num_layers,
out_dim,
out_channels,
dropout=0.,
act=torch.nn.functional.relu):
super().__init__()
self.layers = nn.ModuleList()
self.layers.append(GNAConv(in_dim, hid_dim))
self.layers.append(GNAConv(in_channels, hidden_channels))
for layer in range(num_layers - 2):
self.layers.append(GNAConv(hid_dim,
hid_dim))
self.layers.append(GNAConv(hid_dim, out_dim))
self.layers.append(GNAConv(hidden_channels,
hidden_channels))
self.layers.append(GNAConv(hidden_channels, out_channels))

self.dropout = dropout
self.act = act
Expand Down

0 comments on commit 090d7db

Please sign in to comment.