daiquocnguyen / convkb Goto Github PK
View Code? Open in Web Editor NEWA Novel Embedding Model for Knowledge Base Completion Based on Convolutional Neural Network (NAACL 2018) (Pytorch and Tensorflow)
License: Apache License 2.0
A Novel Embedding Model for Knowledge Base Completion Based on Convolutional Neural Network (NAACL 2018) (Pytorch and Tensorflow)
License: Apache License 2.0
Can you tell me how to find validation loss in your code? Thank you in advance.
Hi there,
When I tried running "python train.py --embedding_dim 100 --num_filters 50 --learning_rate 0.000005 --name FB15k-237 --useConstantInit --model_name fb15k237", It seems the program does not create a new "runs" directory. Do you guys know why?
`python train_ConvKB.py --dataset FB15K237 --hidden_size 100 --num_of_filters 128 --neg_num 10 --valid_step 50 --nbatches 100 --num_epochs 300 --learning_rate 0.01 --lmbda 0.1 --model_name FB15K237_lda-0.1_nneg-10_nfilters-128_lr-0.01 --mode train
Namespace(checkpoint_path=None, dataset='FB15K237', dropout=0.5, hidden_size=100, kernel_size=1, learning_rate=0.01, lmbda=0.1, lmbda2=0.01, mode='train', model_name='FB15K237_lda-0.1_nneg-10_nfilters-128_lr-0.01', nbatches=100, neg_num=10, num_epochs=300, num_of_filters=128, optim='adagrad', save_steps=1000, test_file='', use_init=1, valid_steps=50)
Writing to /Users/***/Downloads/ConvKB-master/runs_pytorch_ConvKB
Traceback (most recent call last):
File "train_ConvKB.py", line 42, in
con = Config()
File "/Users//Downloads/ConvKB-master/ConvKB_pytorch/Config.py", line 34, in init
self.lib = ctypes.cdll.LoadLibrary(base_file)
File "/Users//opt/anaconda3/lib/python3.7/ctypes/init.py", line 442, in LoadLibrary
return self._dlltype(name)
File "/Users//opt/anaconda3/lib/python3.7/ctypes/init.py", line 364, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users//Downloads/ConvKB-master/ConvKB_pytorch/release/Base.so, 6): no suitable image found. Did find:
/Users//Downloads/ConvKB-master/ConvKB_pytorch/release/Base.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
/Users//Downloads/ConvKB-master/ConvKB_pytorch/release/Base.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00`
Hi,
I have read your paper of http://www.semantic-web-journal.net/system/files/swj1867.pdf and found you have implemented ConvKB on the triplet classification task.
I tried to implement it by myself on WN11 dataset but I failed: the model can't fit test set and dev set.I guess the key is about the score function and threshold .
So I would appreciate it if you can provide the code on the task so that I can find where the mistake is.
Thanks a lot!
ConvKB does not work in windows. Do you have a windows version?
In entity2vec.init, is each line from top to bottom corresponding to the vec of entity id of 0, 1,2,3 etc.?
I tried to use the hyperparameters for FB15K_237 to train NELL_995 but the results (hit-10 42.1%) are far below the benchmarks given in the KBAT paper (hit-10 54.5%). So I want to ask are there any other golden hyperparameter settings for different datasets, such as NELL_995?
Thanks.
Hi,
I am unable to reproduce the results reported on FB15k-237
without using the given pre-trained embeddings. Also, providing --pre-trained
as True/False
doesn't make any difference because in either case it is set to True
(reference). The provided training command for FB15k-237
is
python train.py --embedding_dim 100 --num_filters 50 --learning_rate 0.000005 --name FB15k-237 --useConstantInit --model_name fb15k237
This uses a very small learning rate (almost 0), so basically it is not changing the provided pre-trained embeddings during training. Please provide the hyperparameters you used for learning the pre-trained embeddings.
Thanks in advance
Thank you for your code, it helps me a lot!
I am a fresh man, and my English is really poor,
I run the code following your README
when I run the eval code, there is an error like this:
[FileNotFoundError]: No such file or directory: 'XXX/runs/fb15k237/checkpoints/model-200.eval.0.txt'
In the directory "checkpoints",there are
checkpoint model-200.data-00000of-00001 model-200.index model-200.meta
four files
Hello, when I reproduced your model in windows system, "[WinError 193] %1 is not a valid Win32 application." This error, I would like to ask you, you are running the model using 64-bit python and anaconda?
I used your code in my project and found that calculated MRR is greater than 1. I'm not sure that your code is implemented correctly or not.
Hi,
When i run ' CUDA_VISIBLE_DEVICES =2 python train.py --embedding_dim 100 --num_filters 400 --learning_rate 0.00005 --name WN18RR --num_epochs 101 --saveStep 100 --model_name wn18rr_400_3',
why the program stays on ‘Writing to /home/***/code/runs/fb15k237’,and the GPU-Util is 0
the 'checkpoints' is empty
thanks!
When training the model, the shapes of h, r, t are super large. Is this normal?
I want to use my own dataset in Pytorch, but I don't know how to generate the .init file.
I find a problem in the eval.py. when the scores of these entities are same, the ranking of the all entities are 1. Can you explain this?
Try to run this in another dataset,how can i get entity2vec100.init?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.