Error when running TGN
sherjy opened this issue · 1 comments
Hii Linhao, thanks for your nice work. I found an error when I run the TGN model with python train_np.py --data WIKI_0.3 --config config/TGN.yml --base_model snp --ode --eval_neg_samples 50
. The error is reported as below:
Traceback (most recent call last):
File "train_np.py", line 269, in
pred_pos, pred_neg, q_target, q_context = model(mfgs, ts, train_neg_samples)
File "/home/pai/envs/gsnop/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/mnt/workspace/gnn/GSNOP/code/neural_process.py", line 155, in forward
negative_sample=neg_samples)
File "/mnt/workspace/gnn/GSNOP/code/neural_process.py", line 106, in xy_to_mu_sigma
r = self.aggregate(r_i, t, mode)
File "/mnt/workspace/gnn/GSNOP/code/neural_process.py", line 233, in aggregate
r = self.update_cell(self.running_r, current_r)
File "/home/pai/envs/gsnop/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/pai/envs/gsnop/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 1147, in forward
self.bias_ih, self.bias_hh,
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)
fixed by switching to a higher py version