This package includes application demos for all developed tools of MindArmour. Through these demos, you will soon master those tools of MindArmour. Let's Start!
Most of those demos are implemented based on LeNet5 and MNIST dataset. As a preparation, we should download MNIST and train a LeNet5 model first.
The MNIST database of handwritten digits has a training set of 60,000 examples, and a test set of 10,000 examples . It is a subset of a larger set available from MNIST. The digits have been size-normalized and centered in a fixed-size image.
cd examples/common/dataset
mkdir MNIST
cd MNIST
mkdir train
mkdir test
cd train
wget "http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz"
wget "http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz"
gzip train-images-idx3-ubyte.gz -d
gzip train-labels-idx1-ubyte.gz -d
cd ../test
wget "http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz"
wget "http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz"
gzip t10k-images-idx3-ubyte.gz -d
gzip t10k-labels-idx1-ubyte.gz -d
After training the network, you will obtain a group of ckpt files. Those ckpt files save the trained model parameters of LeNet5, which can be used in 'examples/ai_fuzzer' and 'examples/model_security'.
cd examples/common/networks/lenet5
python mnist_train.py
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。