Giter Club home page Giter Club logo

clvr_impl_starter's Introduction

CLVR Implementation Project - Starter Code

Requirements

  • python >= 3.6
  • pytorch >= 1.3

Installation Instructions

Create a virtual environment and install all required packages.

cd clvr_RewIR_starter
pip3 install virtualenv
virtualenv -p $(which python3) ./venv
source ./venv/bin/activate

# Install dependencies
pip3 install -r requirements.txt

Sprites Dataset

We provide a dataset that generates sequences of multiple geometric objects that bounce in a 2D frame on the fly. An example PyTorch dataset can be found at the top of sprites_datagen/moving_sprites.py. You can wrap it in a PyTorch Dataloader to allow for efficient data "loading" when training your model.

At the bottom of the file you can find an example spec that needs to be passed to the Dataset class, in which you can define image resolution, number of shapes in the scene etc. It also allows you to define which rewards your dataset should include (e.g. rewards proportional to x / y position etc). All reward functions are defined in sprites_datagen/rewards.py and you can define more if you want.

Sprites Environment

Renders trajectories the same way as the dataset, but allows to control the movement of the agent by passing in a 2D array of x,y-velocities. Implements the standard gym interface. We provide image and state-based versions of the environment. All environments are registered via sprites_env/__init__.py, including image and state-based environment with different number of distractors.

You can create an instance of a particular environment by running:

import gym
env = gym.make('Sprites-v1')

This will create an image-based environment with one distractor. Change the name to get different environments.

clvr_impl_starter's People

Contributors

kpertsch avatar taklee96 avatar

Watchers

 avatar  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.