From 3dc61ea9a6e64f2f3b6cfc66ba777900c7c14d9c Mon Sep 17 00:00:00 2001 From: Joseph Bethge Date: Tue, 9 Jun 2020 19:36:10 +0200 Subject: [PATCH] Update Documentation --- CHANGELOG.md | 11 +++++++++-- README.md | 46 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a29b3fc20..ba44718e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 43c9dd2e8..e06af6303 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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: