- Install cxflow as described in Cognexa/cxflow.
cxtreambackend install cxtream as described in Cognexa/cxtream.
The cxflow framework installs
cxflow command with which one can train our MNIST network.
To train a network in cxflow, the following components are needed:
- Dataset which provides at least train data stream (e.g.: our fuel dataset)
- Network to be trained (e.g.: a simple MLP)
- Configuration with all the training parameters, hooks etc. (available in configs dir)
Furthermore our MNIST datasets require
train-valid-test split which is generated in
This project contains an example dataset based on fuel backend.
This dataset has no extra dependencies and a training with this dataset can be run with the following command:
$ cxflow train -v config/fuel.yaml
For high-performance data streams with efficient asynchronous computing, you may prefer the cxtream backend written in C++. This project contains an example cxtream dataset as well.
To use the cxtream dataset, the following dependencies have to be installed in addition to the original dependencies of cxtream:
$ pacman -S yaml-cpp
$ apt install libyaml-cpp-dev libboost-iostreams-dev
Build and train
To build the cxtream MNIST dataset and train the network, run the following command:
$ ./build.sh && cxflow train -v config/cxtream.yaml
cxtream - cross-validation split
To generate your own cross-validation split(s) file (
split.csv) containing 5 train-valid-test splits in ratio 7:2:1, run the following command
$ cxflow split -v config/cxtream.yaml -n 5 -r 7 2 1
The source code is distributed under the MIT License.
MNIST dataset is property of Yann LeCun. Please see his webpage for more information.