takuo-h / GNN-for-OOKB

40 stars 17 forks source link

an error #6

Open JokerLee36 opened 5 years ago

JokerLee36 commented 5 years ago

Thank you for your paper and code But I got an error while running, the error details are as follows: (GNN) E:\GNN-for-OOKB-master>python main.py Namespace(activate='relu', alpha0=0, alpha1=0, alpha2=0, alpha3=0, auxiliary_file='datasets/standard/WordNet11/serialized/train', batch_size=5000, beta0=0.01, beta1=0.0001, dev_file='datasets/standard/WordNet11/serialized/dev', dim=200, dropout_block=0.0, dropout_decay=0.0, dropout_embed=0.0, entity_size=38194, epoch_size=1000, gpu_device=0, is_balanced_dev=True, is_balanced_tr=False, is_batchnorm=True, is_bernoulli_trick=True, is_bound_wr=True, is_embed=True, is_known=False, is_residual=False, layerR=1, margin_file='', nn_model='A0', objective_function='absolute', opt_model='Adam', order=1, param_dir='', pool_size=640, pooling_method='max', rel_size=11, sample_size=64, seed=0, test_batch_size=20000, test_file='datasets/standard/WordNet11/serialized/test', threshold=300.0, train_file='datasets/standard/WordNet11/serialized/train', train_size=100000, use_gpu=False) main.py 21:32:15 load train 21:32:16 set axiaulity 21:32:16 standard setting, use: edges=links 21:32:16 load dev dev size: 4880 21:32:16 load test test size: 19746 relation size: 11 entity size: 38194 Traceback (most recent call last): File "main.py", line 291, in main(args) File "main.py", line 197, in main m = get_model(args) File "E:\GNN-for-OOKB-master\models\manager.py", line 7, in get_model if args.nn_model=='A0': return I(args) NameError: name 'I' is not defined

takuo-h commented 5 years ago

Thank you for your report! I investigate it and fix it (maybe) in few days. Thank you.

JokerLee36 commented 5 years ago

I may have found this error, just change return I(args) to return A0(args)in manager.py

takuo-h commented 5 years ago

As JokerLee36 pointed out, renaming model "I" to "A0" is a correct modification. Thank you JokerLee36 a lot! I fix it and I believe it works well.(But, honestly, I forgot details of this old my codes) If you encounter new problems, I'd appreciate if if you could report it here.