Skip to content

Commit

Permalink
append loadables cifar10
Browse files Browse the repository at this point in the history
  • Loading branch information
LeiWang1999 committed Apr 23, 2021
1 parent f89abd6 commit 8b33a8c
Show file tree
Hide file tree
Showing 18 changed files with 2,194 additions and 0 deletions.
Binary file added resnet18-cifar10-caffe/Image/175_4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resnet18-cifar10-caffe/Image/191_7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resnet18-cifar10-caffe/Image/31_9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resnet18-cifar10-caffe/Image/cat_32.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions resnet18-cifar10-caffe/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Compile:

```bash
./nvdla_compiler --prototxt resnet18-cifar10-caffe/deploy.prototxt --caffemodel resnet18-cifar10-caffe/resnet-18.caffemodel --cprecision int8 --calibtable resnet18-cifar10-caffe/resnet18.cifar10.fixed.json --quantizationMode per-kernel
```

**Notice: 经过实验,这里用per-kernel。如果使用per-filter, runtime无论给什么输入输出都是一样的。**

Runtime:

```bash
./nvdla_runtime --loadable fast-math.nvdla --image resnet18-cifar10-caffe/I
mage/175_4.jpg --rawdump
# Output
Work Found!
Work Done
Shutdown signal received, exiting
Test pass
# cat output.dimg
0 0 0 0 126 0 0 0 0 0
```

```bash
./nvdla_runtime --loadable cifar10-int8.nvdla --image resnet18-cifar10-caffe/I
mage/cat_32.jpg --rawdump
# Output
Work Found!
Work Done
Shutdown signal received, exiting
Test pass
# cat output.dimg
0 0 24 92 8 0 0 0 0 0
```

11 changes: 11 additions & 0 deletions resnet18-cifar10-caffe/cifar10/batches.meta.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
airplane
automobile
bird
cat
deer
dog
frog
horse
ship
truck

Binary file added resnet18-cifar10-caffe/cifar10/data_batch_1.bin
Binary file not shown.
19 changes: 19 additions & 0 deletions resnet18-cifar10-caffe/cifar10/get_cifar10.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env sh
# This scripts downloads the CIFAR10 (binary version) data and unzips it.

DIR="$( cd "$(dirname "$0")" ; pwd -P )"
cd "$DIR"

echo "Downloading..."

wget --no-check-certificate http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz

echo "Unzipping..."

tar -xf cifar-10-binary.tar.gz && rm -f cifar-10-binary.tar.gz
mv cifar-10-batches-bin/* . && rm -rf cifar-10-batches-bin

# Creation is split out because leveldb sometimes causes segfault
# and needs to be re-created.

echo "Done."
1 change: 1 addition & 0 deletions resnet18-cifar10-caffe/cifar10/readme.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.cs.toronto.edu/~kriz/cifar.html">
Loading

0 comments on commit 8b33a8c

Please sign in to comment.