Giter Site home page Giter Site logo

kinziro / hierarchical_morphology_transfer_torch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jhejna/hierarchical_morphology_transfer

0.0 0.0 0.0 118 KB

Code for paper "Hierarchically Decoupled Imitation for Morphological Transfer"

Python 100.00%

hierarchical_morphology_transfer_torch's Introduction

Hierarchically Decoupled Imitation for Morphological Transfer

Code for the paper Hierarchically Decoupled Imitation for Morphological Transfer by Donald (Joey) Hejna, Pieter Abbeel, and Lerrel Pinto.

A newer, cleaner version of the code can be found here, however it is untested nor benchmarked.

Setup

  1. Install the required python dependencies using the requirements.txt file. Note that if you want to use GPU, you must swap tensorflow for tensorflow-gpu
  2. Install the bot_transfer package by running pip install -e . from the root of the repository. This will use the setup.py file.

Usage

All training, testing, and rendering can be completed through the scripts in the scripts folder.

Below are example scripts for training models in our framework.

  1. Pre-train Low Level
python scripts/train_model.py --env Ant_Low --alg SAC -t 2500000 --learning-rate 0.0008 \ 
                              --batch-size 100 --layers 400 300 --reset-prob 0.1 \
                              --buffer-size 1000000 --delta-max 4.0 --time-limit 100
  1. Train High Level
python scripts/train_model.py --env Ant_High --alg SAC -t 200000 --time-limit 50 --policy <path to model output folder>
  1. Train Low Level With Discirminative Imitation
python scripts/train_model.py --env Ant_Discriminator --alg DSAC -t 2500000 --learning-rate 0.0008 \
                              --batch-size 100 --layers 400 300 --reset-prob 0.1 \
                              --buffer-size 1000000 --delta-max 4.0 --time-limit 100 \
                              --discrim-learning-rate 0.0002 --discrim-stop 0.5 --discrim-decay true \
                              --discrim-online false --discrim-time-limit 32 \
                              --policy <path to model to imitate>

Note that the default output location is output/MM_DD_YY/env_alg_seed_num

  1. Finetune a High Level Policy with KL-Regularization
python scripts/finetune_high_level_kl.py --low <path to low level model> --high <path to high level model> --env <optional for Maze or Steps> \
                                      -t 100000 --learning-rate 0.01 \
                                      --kl-coef 0.01 --kl-stop 0.5 \
                                      --kl-decay true --kl-type regular

hierarchical_morphology_transfer_torch's People

Contributors

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