(self, k, hidden_dim=128)
| 11 | |
| 12 | class SineEncoding(nn.Module): |
| 13 | def __init__(self, k, hidden_dim=128): |
| 14 | super(SineEncoding, self).__init__() |
| 15 | self.constant = 100 |
| 16 | self.hidden_dim = hidden_dim |
| 17 | self.eig_ws = nn.ModuleList([nn.Linear(hidden_dim + 1, 1) for i in range(k)]) |
| 18 | self.k = k |
| 19 | |
| 20 | def forward(self, e): |
| 21 | # input: [N] |