IBM / TM-GCN

Pytorch code for TM-GCN, a Dynamic Graph Convolutional Networks Using the Tensor M-Product
Apache License 2.0
27 stars 14 forks source link

About dataset generation #4

Open Han-sss opened 3 years ago

Han-sss commented 3 years ago

Hello, dear authors. I am now trying to reproduce the experiment results showed in the paper.

According to your code read_data.py \ full_read_data.py, I generated the saved_content_bitcoin_alpha.mat and saved_content_bitcoin_otc.mat files.

Then I met a problem while running experiment_bitcoin_our_link_prediction.py, which tells me that

Traceback (most recent call last):
  File "experiment_bitcoin_our_link_prediction.py", line 42, in <module>
    A, A_labels, Ct_train_2, Ct_val_2, Ct_test_2, N, M = ehf.load_data(data_loc, mat_f_name, S_train, S_val, S_test, transformed=True)
  File "/home/mount/TM-GCN/TensorGCN-master/embedding_help_functions.py", line 559, in load_data
    A_labels = t.sparse.FloatTensor(t.tensor(np.array(saved_content["A_labels_subs"].transpose(1,0), dtype=int) - 1, dtype=t.long), sq(t.tensor(saved_content["A_labels_vals"])), A_sz)
RuntimeError: number of dimensions must be sparse_dim (35569) + dense_dim (0), but got 3

I found the index and size parameters of constructing the sparse tensor are not match. So could you give me any advice or supply me with the pre-trained model or new version code?

ZeroerWiser commented 1 year ago

i also meet this problem of the chess dataset, could you have solved this problem?