Code Monkey home page Code Monkey logo

conve's Introduction

ConvE

Implementation of ConvE proposed by Dettmers et al. in Convolutional 2D Knowledge Graph Embeddings. You can find the official repository with knowledge graph datasets here.

Implementation uses PyTorch.

Usage

Preprocessing

usage: preprocess.py [-h] {train,valid} ...

Preprocess knowledge graph csv train/valid (test) data.

positional arguments:
  {train,valid}  mode
    train        Preprocess a training set
    valid        Preprocess a valid or test set

optional arguments:
  -h, --help     show this help message and exit

Training set

python preprocess.py train ../train.tsv

Validation set

python preprocess.py valid ../train.pkl ../valid.tsv

Training

python train.py ../train.pkl ../valid.pkl
usage: train.py [-h] [--name NAME] [--batch-size BATCH_SIZE] [--epochs EPOCHS]
                [--label-smooth LABEL_SMOOTH]
                train_path valid_path

Train ConvE with PyTorch.

positional arguments:
  train_path            Path to training .pkl produced by preprocess.py
  valid_path            Path to valid/test .pkl produced by preprocess.py

optional arguments:
  -h, --help            show this help message and exit
  --name NAME           name of the model, used to create a subfolder to save
                        checkpoints
  --batch-size BATCH_SIZE
  --epochs EPOCHS
  --label-smooth LABEL_SMOOTH

conve's People

Contributors

magnusja avatar

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.