forked from tatz1101/Edge-AI-Platform-Tutorials
-
Notifications
You must be signed in to change notification settings - Fork 1
/
5_cifar10_compile.sh
88 lines (70 loc) · 2.77 KB
/
5_cifar10_compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash
# delete previous results
#rm -rf ./compile
# Compile
echo "##########################################################################"
echo "COMPILE WITH DNNC: LeNet with CIFAR10"
echo "##########################################################################"
dnnc --version
#LeNet
dnnc \
--parser=tensorflow \
--frozen_pb=./quantized_results/cifar10/LeNet/deploy_model.pb \
--dcf=./dcf/ZCU102.dcf \
--cpu_arch=arm64 \
--output_dir=compile/cifar10/LeNet \
--save_kernel \
--mode normal \
--net_name=LeNet \
2>&1 | tee rpt/cifar10/5_compile_LeNet.log
mv ./compile/cifar10/LeNet/dpu*.elf ./target_zcu102/cifar10/LeNet/model/
# Compile
echo "##########################################################################"
echo "COMPILE WITH DNNC: miniVggNet with CIFAR10"
echo "##########################################################################"
#miniVggNet
dnnc \
--parser=tensorflow \
--frozen_pb=./quantized_results/cifar10/miniVggNet/deploy_model.pb \
--dcf=./dcf/ZCU102.dcf \
--cpu_arch=arm64 \
--output_dir=compile/cifar10/miniVggNet \
--save_kernel \
--mode normal \
--net_name=miniVggNet \
2>&1 | tee rpt/cifar10/5_compile_miniVggNet.log
mv ./compile/cifar10/miniVggNet/dpu*.elf ./target_zcu102/cifar10/miniVggNet/model/
# Compile
echo "##########################################################################"
echo "COMPILE WITH DNNC: miniGoogleNet with CIFAR10"
echo "##########################################################################"
dnnc \
--parser=tensorflow \
--frozen_pb=./quantized_results/cifar10/miniGoogleNet/deploy_model.pb \
--dcf=./dcf/ZCU102.dcf \
--cpu_arch=arm64 \
--output_dir=compile/cifar10/miniGoogleNet \
--save_kernel \
--mode normal \
--net_name=miniGoogleNet \
2>&1 | tee rpt/cifar10/5_compile_miniGoogleNet.log
mv ./compile/cifar10/miniGoogleNet/dpu*.elf ./target_zcu102/cifar10/miniGoogleNet/model/
# Compile
echo "##########################################################################"
echo "COMPILE WITH DNNC: miniResNet with CIFAR10"
echo "##########################################################################"
dnnc \
--parser=tensorflow \
--frozen_pb=./quantized_results/cifar10/miniResNet/deploy_model.pb \
--dcf=./dcf/ZCU102.dcf \
--cpu_arch=arm64 \
--output_dir=compile/cifar10/miniResNet \
--save_kernel \
--mode normal \
--net_name=miniResNet \
2>&1 | tee rpt/cifar10/5_compile_miniResNet.log
mv ./compile/cifar10/miniResNet/dpu*.elf ./target_zcu102/cifar10/miniResNet/model/
echo "##########################################################################"
echo "COMPILATION COMPLETED with CIFAR10"
echo "##########################################################################"
echo " "