Code Monkey home page Code Monkey logo

shared_workspace's Introduction

Coordination Among Neural Modules Through a Shared Global Workspace

This repository contains the code to reproduce the relational reasoning: sort_of_clever and detecting equilateral triangles tasks from our paper.

Install relevant libraries

pip install -r requirements.txt 

Detecting Equilateral Triangles

Folder: Triangle/

The following commands to be executed from inside in the Triangle folder.

sh run.sh num_layers h_dim ffn_dim share_vanilla_parameters use_topk topk shared_memory_attention seed mem_slots

share_vanilla_parameters: Whether share parameters across layers. If False, it will run TR + HC. For shared workspace experiments it should be True.

use_topk: Whether to use top-k competition

topk: Value of k in top-k competition

shared_memory_attention: Whether to use shared workspace

mem_slots: Number of slots in memory

To reproduce experiments in paper:

TR + HSW
sh run.sh 4 256 512 True True 20 True 1 8 default

TR + SSW
sh run.sh 4 256 512 True False 20 True 1 8 default

TR 
sh run.sh 4 256 512 True False 20 False 1 8 default

STR 
sh run.sh 4 256 512 True True 20 False 1 8 default

TR + HC
sh run.sh 4 256 512 False False 20 False 1 8 default

ISAB
sh run.sh 4 256 512 False False 20 False 1 8 functional

Sort-of-CLEVR

The following commands to be executed from inside in the sort_of_clevr folder.

Dataset generation:

python sort_of_clevr_generator.py
sh run_transformer.sh h_dim num_layers share_vanilla_parameters use_topk topk shared_memory_attention mem_slots seed

To reproduce experiments in paper:

TR + HSW
sh run_transformer.sh 256 4 True True 5 True 8 1 False

TR
sh run_transformer.sh 256 4 True False 5 False 8 1 False

STR
sh run_transformer.sh 256 4 True True 5 False 8 1 False

TR + HC
sh run_transformer.sh 256 4 False False 5 False 8 1 False

ISAB
sh run_transformer.sh 256 4 False False 5 False 8 1 True


shared_workspace's People

Contributors

dido1998 avatar kartikeya-badola 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.