ifis-tu-bs / pyke Goto Github PK
View Code? Open in Web Editor NEWCollection of implementations of Knowledge Embedding Models. Originally forked from https://github.com/thunlp/OpenKE.
Collection of implementations of Knowledge Embedding Models. Originally forked from https://github.com/thunlp/OpenKE.
During the execution of TransR, the following error occurs:
Traceback (most recent call last):
File "/Users/milost/anaconda/envs/pyKE/bin/pyke", line 11, in <module>
load_entry_point('pyKE', 'console_scripts', 'pyke')()
File "/Users/milost/anaconda/envs/pyKE/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/Users/milost/anaconda/envs/pyKE/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/Users/milost/anaconda/envs/pyKE/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/milost/anaconda/envs/pyKE/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/milost/anaconda/envs/pyKE/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/Users/milost/Code/Python/pyKE/pyke/bin/pyke.py", line 68, in transr
margin=margin,
File "/Users/milost/Code/Python/pyKE/pyke/embedding.py", line 52, in __init__
self.__init_config()
File "/Users/milost/Code/Python/pyKE/pyke/embedding.py", line 78, in __init_config
con.set_model(self.model_class)
File "/Users/milost/Code/Python/pyKE/pyke/openke/Config.py", line 257, in set_model
self.trainModel = self.model(config=self)
File "/Users/milost/Code/Python/pyKE/pyke/models/Model.py", line 87, in __init__
self.loss_def()
File "/Users/milost/Code/Python/pyKE/pyke/models/TransR.py", line 51, in loss_def
p_h = tf.reshape(self._transfer(pos_matrix, pos_h_e), [-1, config.rel_size])
File "/Users/milost/Code/Python/pyKE/pyke/models/TransR.py", line 10, in _transfer
return tf.batch_matmul(transfer_matrix, embeddings)
AttributeError: module 'tensorflow' has no attribute 'batch_matmul'
According to this issue the tf.batch_matmul() op was removed in 3a88ec0. So we need to replace to the call to tf.batch_matmul with another call, probably something like tf.linalg.matmul
Add Sphinx documentation and submit to Read The Docs.
The model is currently only saved after the whole training process.
Add unit tests to provide faster testing
It should be possible to get the embedding of a specific entity. To this end, we need to add the corresponding query functionality to the Embedding class.
The user must provide benchmark files in order to train a model. These files are composed of an entity, a relation, a train and a validation file.
The user should be able to provide a N-Triples-file to train a model (https://en.wikipedia.org/wiki/N-Triples).
The training of TransE is incorrect. The loss goes down too fast.
Parameters:
dim: 50
neg_ent: 5
folds: 20
epochs: 20
After the fourth iteration the loss reaches 0.0. The original project takes a lot longer to decrease.
Tensorflow allocated the complete amount of gpu memory. This behaviour should be changed to a variable amount of memory to allow multiple users to use one GPU.
During the training process, only two numbers are displayed on the console. Intuitively it is certainly clear what is meant by the two values, but it would be nice if they were better readable.
The project should be restructured to provide a python package which can be installed via
python setup.py install
.
It would be nice to have a console script that allows you to start the training process for embeddings directly from the console.
The C++ part of the application and the shared library should be removed.
The contents of the library should be available in Python.
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.