working-yuhao / DEAL

IJCAI2020
MIT License
20 stars 6 forks source link

TypeError: 'NoneType' object is not subscriptable #8

Closed rhythming closed 3 years ago

rhythming commented 3 years ago

Device: using cuda:0 theta_list:(0.1, 0.85, 0.05) Namespace(BCE_mode=True, approximate=-1, attr_model='Emb', batch_size=8, cache=True, comment='0', cuda='0', dataset='CiteSeer', dropout=False, epoch_log=2, epoch_num=5000, feature_dim=64, gamma=2, gpu=True, hidden_dim=64, inductive=False, layer_num=2, loss='default', lr=0.01, output_dim=64, ps='', remove_link_ratio=0.2, repeat_num=1, res_dir=None, rm_feature=False, strong_A=False, task='link', train_mode='cos', train_ratio=0.1, use_order=False) 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "train.py", line 117, in loss = deal.default_loss(inputs, labels, data, thetas=theta_list, train_num=int(X_train.shape[0] args.train_ratio)2) File "/home/fn/zml/DEAL/DEAL-master/model.py", line 466, in default_loss dists = data.dists[nodes[:,0],nodes[:,1]] TypeError: 'NoneType' object is not subscriptable

I don't know why this is happening,Can you take a look at it for me?

rhythming commented 2 years ago

I had the same issue and the solution is to download the dists-1.dat file, as in data/CiteSeer/About dist data. I created a fork to assist with the setup instructions (see Installation here https://github.com/lajd/DEAL/blob/master/README.md)

------------------ 原始邮件 ------------------ 发件人: "working-yuhao/DEAL" @.>; 发送时间: 2021年10月14日(星期四) 上午10:24 @.>; @.**@.>; 主题: Re: [working-yuhao/DEAL] TypeError: 'NoneType' object is not subscriptable (#8)

Hi @rhythming , I met the same issue, may I know how you solved it? thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

Wyz-8263 commented 2 years ago

Solved it, thanks!