Skip to content

Commit 3dc61ea

Browse files
committed
Update Documentation
1 parent 03b6e72 commit 3dc61ea

2 files changed

Lines changed: 54 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](http://keepachangelog.com/)
77
and this project adheres to [Semantic Versioning](http://semver.org/).
88

9-
## [0.4.0] - Unreleased
9+
## [0.4.1] - 2020-06-09
10+
11+
### Added
12+
13+
- RAdam optimizer
14+
- Docker build instructions
15+
16+
## [0.4.0] - 2019-12-18
1017

1118
### Changed
1219

13-
- Upgrade base version of mxnet to *mxnet v1.5.0*
20+
- Upgrade base version of mxnet to *mxnet v1.5.1*
1421

1522
### Fixed
1623

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This aim was to have only minimal changes to C++ code to get better maintainabil
77

88
## mxnet version
99

10-
This version of BMXNet 2 is based on: *mxnet v1.5.0*
10+
This version of BMXNet 2 is based on: *mxnet v1.5.1*
1111

1212
## News
1313

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

2323
# Setup
2424

25+
If you only want to test the basics, you can also look at our [docker setup](#docker-setup).
26+
2527
We use [CMake](https://cmake.org/download/) to build the project.
2628
Make sure to [install all the dependencies described here](docs/install/build_from_source.md#prerequisites).
2729
If you install CUDA 10, you will need CMake >=3.12.2
@@ -114,6 +116,48 @@ The rest of our code resides in the following folders/files:
114116

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

119+
## Docker setup
120+
121+
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.
122+
123+
```bash
124+
cd ci
125+
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
126+
```
127+
128+
Then you can enter the container (and automatically delete it)
129+
```bash
130+
docker run --rm -it bmxnet2-base/build.ubuntu_cpu # deletes the container after running
131+
docker run -it bmxnet2-base/build.ubuntu_cpu # keeps the container after running (it needs to be removed manually later)
132+
```
133+
134+
Inside the container you can now clone, build and test BMXNet 2
135+
```bash
136+
# clone
137+
mkdir -p /builds/
138+
cd /builds/
139+
git clone https://github.com/hpi-xnor/BMXNet-v2.git bmxnet --recursive
140+
cd bmxnet
141+
# build
142+
mkdir build
143+
cd build
144+
cmake -DBINARY_WORD_TYPE=uint32 -DUSE_CUDA=OFF -DUSE_MKL_IF_AVAILABLE=OFF -GNinja ..
145+
cd ..
146+
cmake --build build
147+
export PYTHONPATH=/builds/bmxnet/python # add python binding
148+
# run the tests (we need to upgrade pytest first via pip3)
149+
pip3 install pytest --upgrade
150+
pytest tests/binary
151+
```
152+
153+
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).
154+
```bash
155+
cd example/bmxnet-examples/mnist/
156+
git checkout master
157+
pip3 install mxboard
158+
python3 mnist-lenet.py --bits 1 # trains a binary lenet model with 1 bit activations and 1 bit weights on MNIST
159+
```
160+
117161
### Citing BMXNet 2
118162

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

0 commit comments

Comments
 (0)