Skip to content

Commit

Permalink
Update Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jopyth committed Jun 9, 2020
1 parent 03b6e72 commit 3dc61ea
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Expand Up @@ -6,11 +6,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.4.0] - Unreleased
## [0.4.1] - 2020-06-09

### Added

- RAdam optimizer
- Docker build instructions

## [0.4.0] - 2019-12-18

### Changed

- Upgrade base version of mxnet to *mxnet v1.5.0*
- Upgrade base version of mxnet to *mxnet v1.5.1*

### Fixed

Expand Down
46 changes: 45 additions & 1 deletion README.md
Expand Up @@ -7,7 +7,7 @@ This aim was to have only minimal changes to C++ code to get better maintainabil

## mxnet version

This version of BMXNet 2 is based on: *mxnet v1.5.0*
This version of BMXNet 2 is based on: *mxnet v1.5.1*

## News

Expand All @@ -22,6 +22,8 @@ See all BMXNet changes: [Changelog](CHANGELOG.md).

# Setup

If you only want to test the basics, you can also look at our [docker setup](#docker-setup).

We use [CMake](https://cmake.org/download/) to build the project.
Make sure to [install all the dependencies described here](docs/install/build_from_source.md#prerequisites).
If you install CUDA 10, you will need CMake >=3.12.2
Expand Down Expand Up @@ -114,6 +116,48 @@ The rest of our code resides in the following folders/files:

For more details see the [Changelog](CHANGELOG.md).

## Docker setup

A docker image for testing of BMXNet can be build similar to our CI script at [.gitlab-ci.yml](.gitlab-ci.yml), however it only supports CPU, so actual training might be tedious.

```bash
cd ci
docker build -f docker/Dockerfile.build.ubuntu_cpu --build-arg USER_ID=1000 --build-arg GROUP_ID=1000 --cache-from bmxnet2-base/build.ubuntu_cpu -t bmxnet2-base/build.ubuntu_cpu docker
```

Then you can enter the container (and automatically delete it)
```bash
docker run --rm -it bmxnet2-base/build.ubuntu_cpu # deletes the container after running
docker run -it bmxnet2-base/build.ubuntu_cpu # keeps the container after running (it needs to be removed manually later)
```

Inside the container you can now clone, build and test BMXNet 2
```bash
# clone
mkdir -p /builds/
cd /builds/
git clone https://github.com/hpi-xnor/BMXNet-v2.git bmxnet --recursive
cd bmxnet
# build
mkdir build
cd build
cmake -DBINARY_WORD_TYPE=uint32 -DUSE_CUDA=OFF -DUSE_MKL_IF_AVAILABLE=OFF -GNinja ..
cd ..
cmake --build build
export PYTHONPATH=/builds/bmxnet/python # add python binding
# run the tests (we need to upgrade pytest first via pip3)
pip3 install pytest --upgrade
pytest tests/binary
```

You can even train a simple binary MNIST model, but you might need to update the examples to the newest version first (checkout the master branch).
```bash
cd example/bmxnet-examples/mnist/
git checkout master
pip3 install mxboard
python3 mnist-lenet.py --bits 1 # trains a binary lenet model with 1 bit activations and 1 bit weights on MNIST
```

### Citing BMXNet 2

Please cite [our paper](https://arxiv.org/abs/1812.01965) about BMXNet 2 in your publications if it helps your research work:
Expand Down

0 comments on commit 3dc61ea

Please sign in to comment.