Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing import? #7

Open
LaurentBerder opened this issue Apr 13, 2023 · 0 comments
Open

Missing import? #7

LaurentBerder opened this issue Apr 13, 2023 · 0 comments

Comments

@LaurentBerder
Copy link

Hi,

I'm trying out your code to gain a better understanding of the whole concept, but I get an error:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-21-5955e675779a> in <module>
     2 back_length = 3
     3 Clamp_A = False
----> 4 gclstm = GraphConvolutionalLSTM(K, torch.Tensor(A), FFR[back_length], A.shape[0], Clamp_A=Clamp_A, output_last = True)
     5 gclstm, gclstm_loss = TrainModel(gclstm, train_dataloader, valid_dataloader, num_epochs = 1)
     6 gclstm_test = TestModel(gclstm, test_dataloader, max_speed )

<ipython-input-17-b87e6355c7f7> in __init__(self, K, A, FFR, feature_size, Clamp_A, output_last)
    28
    29         # a length adjustable Module List for hosting all graph convolutions
---> 30         self.gc_list = nn.ModuleList([FilterLinear(feature_size, feature_size, self.A_list[i], bias=False) for i in range(K)])
    31
    32         hidden_size = self.feature_size

<ipython-input-17-b87e6355c7f7> in <listcomp>(.0)
    28
    29         # a length adjustable Module List for hosting all graph convolutions
---> 30         self.gc_list = nn.ModuleList([FilterLinear(feature_size, feature_size, self.A_list[i], bias=False) for i in range(K)])
    31
    32         hidden_size = self.feature_size

NameError: name 'FilterLinear' is not defined

FilterLinear is not something you defined, and it's not something you import either. Do you remember where it comes from?

Obviously, since it's been a while since you posted your code I am not running the same version of PyTorch (1.12.1+cu116 instead of 0.42), but it doesn't seem like it's an import as you're not doing any import star.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant