Go to file
2023-05-22 14:25:26 +02:00
dmc2gym Adding Natural Noise 2023-05-16 12:40:47 +02:00
local_dm_control_suite Adding Natural Noise 2023-05-16 12:40:47 +02:00
results add results 2019-10-12 11:22:24 -07:00
.gitignore init 2019-09-23 11:20:48 -07:00
conda_env.yml Minor changes 2023-05-22 14:24:05 +02:00
decoder.py changes 2019-09-23 11:38:55 -07:00
encoder.py Adding encoder 2023-05-22 14:08:02 +02:00
LICENSE Create LICENSE 2020-05-02 21:46:30 -04:00
logger.py Adding files 2023-05-22 14:11:11 +02:00
README.md Update Readme 2023-05-16 12:44:14 +02:00
sac_ae.py Adding files 2023-05-22 14:11:11 +02:00
train.py Minor Changes 2023-05-22 14:25:26 +02:00
utils.py Adding files 2023-05-22 14:11:11 +02:00
video.py init 2019-09-23 11:20:48 -07:00

Requirements

We assume you have access to a gpu that can run CUDA 9.2. Then, the simplest way to install all required dependencies is to create an anaconda environment by running:

conda env create -f conda_env.yml

After the instalation ends you can activate your environment with:

source activate pytorch_sac_ae

Instructions

To train an agent on the cheetah run task from image-based observations run:

python train.py \
    --domain_name cheetah \
    --task_name run \
    --encoder_type pixel \
    --decoder_type pixel \
    --action_repeat 4 \
    --save_video \
    --save_tb \
    --work_dir ./log \
    --seed 1 \
    --img_source video \
    --resource_files "/media/vedant/cpsDataStorageWK/Vedant/train/*.mp4"

This will produce 'log' folder, where all the outputs are going to be stored including train/eval logs, tensorboard blobs, and evaluation episode videos. One can attacha tensorboard to monitor training by running:

tensorboard --logdir log

and opening up tensorboad in your browser.

The console output is also available in a form:

| train | E: 1 | S: 1000 | D: 0.8 s | R: 0.0000 | BR: 0.0000 | ALOSS: 0.0000 | CLOSS: 0.0000 | RLOSS: 0.0000

a training entry decodes as:

train - training episode
E - total number of episodes 
S - total number of environment steps
D - duration in seconds to train 1 episode
R - episode reward
BR - average reward of sampled batch
ALOSS - average loss of actor
CLOSS - average loss of critic
RLOSS - average reconstruction loss (only if is trained from pixels and decoder)

while an evaluation entry:

| eval | S: 0 | ER: 21.1676

which just tells the expected reward ER evaluating current policy after S steps. Note that ER is average evaluation performance over num_eval_episodes episodes (usually 10).