https://github.com/tung-nd/e2c-pytorch
A pytorch implementation of the paper "Embed to Control: A Locally Linear Latent Dynamics Model for Control from Raw Images", NIPS, 2015
https://github.com/tung-nd/e2c-pytorch
python pytorch reinforcement-learning representation-learning
Last synced: about 1 year ago
JSON representation
A pytorch implementation of the paper "Embed to Control: A Locally Linear Latent Dynamics Model for Control from Raw Images", NIPS, 2015
- Host: GitHub
- URL: https://github.com/tung-nd/e2c-pytorch
- Owner: tung-nd
- Created: 2019-09-13T08:40:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-30T17:17:27.000Z (over 6 years ago)
- Last Synced: 2025-04-10T23:13:50.538Z (about 1 year ago)
- Topics: python, pytorch, reinforcement-learning, representation-learning
- Language: Jupyter Notebook
- Homepage:
- Size: 2.02 MB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Embed to Control
This is a pytorch implementation of the paper "[Embed to Control: A Locally Linear Latent Dynamics Model for Control from Raw Images](https://arxiv.org/abs/1506.07365)", NIPS, 2015.
**Note: This is not and official implementation.**
### Installing
First, clone the repository:
```
git clone https://github.com/tungnd1705/E2C-pytorch.git
```
Install the dependencies as listed in `env.yml` and activate the environment
```
conda env create -f env.yml
conda activate e2c
```
Then install the patch version of gym in order to sample the pendulum data
```
cd gym
python setup.py install
```
### Simulate training data
Currently the code supports simulating 3 environments: `planar`, `pendulum` and `cartpole`.
In order to generate data, simply run `python sample_{env_name}_data.py --sample_size={sample_size}`.
**Note: the sample size is equal to the total number of training and test data**
For the planar task, we base on [this](https://github.com/ethanluoyc/e2c-pytorch) implementation and modify for our needs.
### Training
Run the ``train_e2c.py`` with your own settings. Example:
```
python train_e2c.py \
--env=planar \
--propor=3/4 \
--batch_size=128 \
--lr=0.0001 \
--lam=0.25 \
--num_iter=5000 \
--iter_save=1000
```
You can visualize the training process by running ``tensorboard --logdir=logs``.
### Citation
If you find E2C useful in your research, please consider citing:
```
@inproceedings{watter2015embed,
title={Embed to control: A locally linear latent dynamics model for control from raw images},
author={Watter, Manuel and Springenberg, Jost and Boedecker, Joschka and Riedmiller, Martin},
booktitle={Advances in neural information processing systems},
pages={2746--2754},
year={2015}
}
```