GithubHelp home page GithubHelp logo

jaehyunnn / relationalnetwork_pytorch Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 8 KB

An un-official implementation of Relational Network [A. Santoro et al., 2017] (PyTorch)

Python 100.00%
relationalnetwork-pytorch pytorch relational-reasoning visual-reasoning

relationalnetwork_pytorch's Introduction

Relation Networks Implementation

This is the implementation of the paper:

"A simple neural network module for relational reasoning," A. Santoro et al., 2017

Required package

  • Python 3
  • PyTorch ,torchvision
  • termcolor ,tqdm

Usage

  • train.py is the main training script
# select model_type (base, improved, improved2)

$ python train.py --model-type 'base'
$ python train.py --model-type 'improved'
$ python train.py --model-type 'improved2'

  • eval.py evaluates on Sort-of-CLEVR dataset
# select model_type (base, improved, improved2)

$ python eval.py --model-type 'base' --load-model 'trained_model/base_model.pth.tar'
$ python eval.py --model-type 'improved' --load-model 'trained_model/improved_model.pth.tar' 
$ python eval.py --model-type 'improved2' --load-model 'trained_model/improved_model2.pth.tar' 

Experimental Results

Models Overall Non-relational question Relational question
Reproduced RNs (base) 96.4 % 99.5 % 93.4 %
RNs + Weighed pairs (improved) 97.5 % 99.8 % 95.1 %
RNs + Enhanced features (improved2) 97.7 % 99.8 % 95.6 %

Files

.
├── datsets/
    ├── sort-of-clevr_test.pickle
    └── sort-of-clevr_train.pickle
├── util/
    ├── torch_util.py
    └── train_test_fn.py
├── models/
    ├── base_model.py
    └── improved_model.py
├── trained_models/
    ├── base_model.pth.tar
    └── improved_model.pth.tar
├── so_clevr_dataset.py
├── eval.py
├── train.py
└── README.md

Note

If you need the trained model (chekpoint) or dataset (sort-of-clevr), feel free to send me an e-mail.

Author

@ Jae-Hyun Park

relationalnetwork_pytorch's People

Contributors

jaehyunnn avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

relationalnetwork_pytorch's Issues

Dataset

Can you provide a description to obtain the dataset?

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.