Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Updates to several examples #13068

Merged
merged 3 commits into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions example/reinforcement-learning/ddpg/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# mx-DDPG
MXNet Implementation of DDPG

## /!\ This example depends on RLLAB which is deprecated /!\
ThomasDelteil marked this conversation as resolved.
Show resolved Hide resolved

# Introduction

This is the MXNet implementation of [DDPG](https://arxiv.org/abs/1509.02971). It is tested in the rllab cart pole environment against rllab's native implementation and achieves comparably similar results. You can substitute with this anywhere you use rllab's DDPG with minor modifications.
Expand Down
6 changes: 3 additions & 3 deletions example/reinforcement-learning/dqn/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ pip install pygame

# Install arcade learning environment
if [[ "$OSTYPE" == "linux-gnu" ]]; then
sudo apt-get install libsdl1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev cmake
sudo apt-get install libsdl1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev cmake ninja-build
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
fi
git clone git@github.com:mgbellemare/Arcade-Learning-Environment.git || true
git clone https://github.com/mgbellemare/Arcade-Learning-Environment || true
pushd .
cd Arcade-Learning-Environment
mkdir -p build
Expand All @@ -43,6 +43,6 @@ popd
cp Arcade-Learning-Environment/ale.cfg .

# Copy roms
git clone git@github.com:npow/atari.git || true
git clone https://github.com/npow/atari || true
cp -R atari/roms .

52 changes: 52 additions & 0 deletions example/restricted-boltzmann-machine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,58 @@ Here are some samples generated by the RBM with the default hyperparameters. The

<p style="text-align:center"><img src="samples.png"/></p>

Usage:

```
python binary_rbm_gluon.py --help
usage: binary_rbm_gluon.py [-h] [--num-hidden NUM_HIDDEN] [--k K]
[--batch-size BATCH_SIZE] [--num-epoch NUM_EPOCH]
[--learning-rate LEARNING_RATE]
[--momentum MOMENTUM]
[--ais-batch-size AIS_BATCH_SIZE]
[--ais-num-batch AIS_NUM_BATCH]
[--ais-intermediate-steps AIS_INTERMEDIATE_STEPS]
[--ais-burn-in-steps AIS_BURN_IN_STEPS] [--cuda]
[--no-cuda] [--device-id DEVICE_ID]
[--data-loader-num-worker DATA_LOADER_NUM_WORKER]

Restricted Boltzmann machine learning MNIST

optional arguments:
-h, --help show this help message and exit
--num-hidden NUM_HIDDEN
number of hidden units
--k K number of Gibbs sampling steps used in the PCD
algorithm
--batch-size BATCH_SIZE
batch size
--num-epoch NUM_EPOCH
number of epochs
--learning-rate LEARNING_RATE
learning rate for stochastic gradient descent
--momentum MOMENTUM momentum for the stochastic gradient descent
--ais-batch-size AIS_BATCH_SIZE
batch size for AIS to estimate the log-likelihood
--ais-num-batch AIS_NUM_BATCH
number of batches for AIS to estimate the log-
likelihood
--ais-intermediate-steps AIS_INTERMEDIATE_STEPS
number of intermediate distributions for AIS to
estimate the log-likelihood
--ais-burn-in-steps AIS_BURN_IN_STEPS
number of burn in steps for each intermediate
distributions of AIS to estimate the log-likelihood
--cuda train on GPU with CUDA
--no-cuda train on CPU
--device-id DEVICE_ID
GPU device id
--data-loader-num-worker DATA_LOADER_NUM_WORKER
number of multithreading workers for the data loader
```
Default:
```
Namespace(ais_batch_size=100, ais_burn_in_steps=10, ais_intermediate_steps=10, ais_num_batch=10, batch_size=80, cuda=True, data_loader_num_worker=4, device_id=0, k=30, learning_rate=0.1, momentum=0.3, num_epoch=130, num_hidden=500)
```
[1] G E Hinton &amp; R R Salakhutdinov, Reducing the Dimensionality of Data with Neural Networks Science **313**, 5786 (2006)<br/>
[2] R M Neal, Annealed importance sampling. Stat Comput **11** 2 (2001)<br/>
[3] R Salakhutdinov &amp; I Murray, On the quantitative analysis of deep belief networks. In Proc. ICML '08 **25** (2008)
264 changes: 0 additions & 264 deletions example/rnn-time-major/bucket_io.py

This file was deleted.

43 changes: 0 additions & 43 deletions example/rnn-time-major/get_sherlockholmes_data.sh

This file was deleted.

Loading