Giter Club home page Giter Club logo

pyke's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pyke's Issues

Handle deprecation of tf.batch_matmul

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 save/restore features

The model is currently only saved after the whole training process.

  • The user should be able to save the embedding to a JSON file.
  • The application should save the model during the training process. This is archived with a parameter "autosave" which is the time period after which the model is saved.
  • The application should read an existing model and continue training.

Query entity embeddings

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.

Loss is reduced too fast

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.

Add more readable progress reporting

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.

Restructure project

The project should be restructured to provide a python package which can be installed via
python setup.py install.

Train embeddings from console

It would be nice to have a console script that allows you to start the training process for embeddings directly from the console.

Remove C++ part

The C++ part of the application and the shared library should be removed.
The contents of the library should be available in Python.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.