# README
MNIST Example
This example follows MNIST example provided by ONNX models.
Prepare
Requirements
ONNX model and dataset
Download dataset and extract.
$ wget https://www.cntk.ai/OnnxModels/mnist/opset_7/mnist.tar.gz -P data
$ tar xfz data/mnist.tar.gz -C data
example/mnist/
├── README.md (this file)
├── data
│ ├── mnist
│ │ ├── mnist.onnx
│ │ ├── test_data_set_0
│ │ │ ├── input_0.pb
│ │ │ └── output_0.pb
│ │ ├── test_data_set_1
│ │ │ ├── ...
│ │ └── test_data_set_2
│ │ ├── ...
│ └── mnist.tar.gz
└── main.go
Replace model
model.onnx
uses auto_pad
attribute (Issue#85), which is deprecated. Menoh does not support the attribute. Until resolved the issue, this example uses other ONNX model.
$ wget https://github.com/pfnet-research/menoh-haskell/raw/master/data/mnist.onnx -P data/mnist
Run with test dataset
$ go run main.go
Return nothing when no error.
Option
data
: path of dataset. setdata/mnist
on default.model
: path of ONNX model. setdata
+ "/mnist.onnx" on default.- when fixing Issue#85, will set
data
+ "/model.onnx" on default.
- when fixing Issue#85, will set
mode
: running mode, choose from "test" or "server", set "test" on default.- "test" mode runs with
test_data_set_*
, compares results - current only supports "test" mode.
- "test" mode runs with