# [20’Spring] Week11
###### tags: `lab-project`
## diff map xor
## clustroid for more efficient computing
spatial, temporal
## diff map average
failed
## diff map max
#### baoquan
* w/o filtering, handle padding
```
2020-03-13 23:42:31.173 19812-19869/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17187 ms
2020-03-13 23:42:31.175 19812-19869/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
12.90114 -5.218685 -1.3912613 -8.002878 -2.620539
---
2020-03-13 23:42:48.403 19812-19869/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17223 ms
2020-03-13 23:42:48.403 19812-19869/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
11.566264 -5.6278343 -3.1890428 -8.141483 -0.091991045
```
* w/ filtering, handle padding
```
2020-03-13 23:45:26.849 20335-20385/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17652 ms
2020-03-13 23:45:26.851 20335-20385/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
12.93332 -5.3362627 -1.4031662 -7.9950376 -2.5988307
---
2020-03-13 23:45:44.431 20335-20385/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17579 ms
2020-03-13 23:45:44.431 20335-20385/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
11.552812 -5.667477 -3.058612 -8.046435 -0.20527259
```
* w/o filtering, do not handle padding
```
2020-03-13 23:55:14.816 21812-21861/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17524 ms
2020-03-13 23:55:14.818 21812-21861/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
12.918892 -4.9049635 -2.2540457 -8.383789 -2.1299508
---
2020-03-13 23:55:32.377 21812-21861/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17558 ms
2020-03-13 23:55:32.377 21812-21861/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
12.072841 -5.9176083 -3.3843758 -8.393164 -0.12752864
```
* w/ filtering, do not handle padding
```
2020-03-13 23:50:49.883 21110-21170/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17258 ms
2020-03-13 23:50:49.885 21110-21170/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
12.995238 -5.030136 -2.3295918 -8.424662 -2.0622065
---
2020-03-13 23:51:07.110 21110-21170/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17220 ms
2020-03-13 23:51:07.110 21110-21170/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
12.114028 -5.938201 -3.2359614 -8.318698 -0.2753062
```
### diff map max abs
* w/o filtering, handle padding
```
2020-03-14 00:12:43.147 24627-24684/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17220 ms
2020-03-14 00:12:43.149 24627-24684/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
10.324461 -3.6767523 -2.1026947 -6.546687 -1.8395859
---
2020-03-14 00:13:00.375 24627-24684/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17225 ms
2020-03-14 00:13:00.375 24627-24684/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
12.073916 -6.194248 -6.2570624 -10.820642 2.6083171
```
* w/ filtering, handle padding
```
2020-03-14 00:10:26.386 24199-24245/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17744 ms
2020-03-14 00:10:26.388 24199-24245/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
10.240096 -3.6361918 -2.0185323 -6.3902016 -1.9206098
---
2020-03-14 00:10:44.140 24199-24245/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17750 ms
2020-03-14 00:10:44.141 24199-24245/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
12.087965 -6.2136955 -6.2377357 -10.702657 2.5342314
```
* w/o filtering, do not handle padding
```
2020-03-14 00:03:37.932 23030-23093/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17459 ms
2020-03-14 00:03:37.934 23030-23093/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
9.598824 -3.405836 -2.1256788 -6.3236856 -1.5988381
---
2020-03-14 00:03:55.456 23030-23093/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17516 ms
2020-03-14 00:03:55.457 23030-23093/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
12.283133 -6.297736 -6.52759 -11.28255 2.7687645
```
* w/ filtering, do not handle padding
```
2020-03-14 00:06:59.315 23578-23674/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17482 ms
2020-03-14 00:06:59.317 23578-23674/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
9.447618 -3.4408817 -1.9464738 -6.0876675 -1.6550823
---
2020-03-14 00:07:16.825 23578-23674/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17506 ms
2020-03-14 00:07:16.825 23578-23674/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
12.309314 -6.2545924 -6.424532 -11.109447 2.5998638
```
## diff map max fusion for each category
#### bicha
* w/o filtering, handle padding(1 error)
```
2020-03-19 16:13:57.197 7144-7195/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17211 ms
2020-03-19 16:13:57.199 7144-7195/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.94 bicha: 0.06 dianzan: 0.00 huishou: 0.00 paishou: 0.00
9.089704 6.263196 -12.149899 -14.060828 0.36554834
---
2020-03-19 16:14:14.430 7144-7195/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17229 ms
2020-03-19 16:14:14.430 7144-7195/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.31 bicha: 0.69 dianzan: 0.00 huishou: 0.00 paishou: 0.00
7.299457 8.115095 -9.656038 -8.452175 -3.62221
```
* w/ filtering, handle padding(1 error)
```
2020-03-19 16:11:09.018 6267-6512/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17636 ms
2020-03-19 16:11:09.020 6267-6512/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.95 bicha: 0.05 dianzan: 0.00 huishou: 0.00 paishou: 0.00
8.980893 5.9714317 -12.117992 -14.253625 0.76939905
---
2020-03-19 16:11:26.597 6267-6512/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17570 ms
2020-03-19 16:11:26.598 6267-6512/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.27 bicha: 0.73 dianzan: 0.00 huishou: 0.00 paishou: 0.00
7.0931225 8.07897 -9.622873 -8.2979555 -3.4788597
```
* w/o filtering, do not handle padding(1 error)
```
2020-03-19 16:16:17.606 7764-7838/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17530 ms
2020-03-19 16:16:17.609 7764-7838/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.96 bicha: 0.04 dianzan: 0.00 huishou: 0.00 paishou: 0.00
10.192486 7.0457087 -13.162271 -15.066699 -0.22563148
---
2020-03-19 16:16:35.164 7764-7838/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17553 ms
2020-03-19 16:16:35.164 7764-7838/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.01 bicha: 0.99 dianzan: 0.00 huishou: 0.00 paishou: 0.00
5.504524 9.975203 -10.304123 -7.816304 -3.9717486
```
* w/ filtering, do not handle padding(1 error)
```
2020-03-19 16:19:54.930 8725-8772/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17205 ms
2020-03-19 16:19:54.933 8725-8772/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.98 bicha: 0.02 dianzan: 0.00 huishou: 0.00 paishou: 0.00
10.37766 6.709921 -13.271322 -15.409261 0.124422766
---
2020-03-19 16:20:12.138 8725-8772/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17204 ms
2020-03-19 16:20:12.138 8725-8772/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.02 bicha: 0.98 dianzan: 0.00 huishou: 0.00 paishou: 0.00
5.647276 9.695436 -10.222614 -7.771797 -3.8499296
```
#### dianzan
* w/o filtering, handle padding
```
2020-03-19 16:33:37.394 10771-10837/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17256 ms
2020-03-19 16:33:37.396 10771-10837/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-2.5266821 -5.9050455 9.446319 -4.1762943 -0.23538691
---
2020-03-19 16:33:54.648 10771-10837/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17251 ms
2020-03-19 16:33:54.648 10771-10837/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.01 bicha: 0.00 dianzan: 0.99 huishou: 0.00 paishou: 0.00
1.7831607 -4.3759713 6.1809845 -4.7623887 -0.9633912
```
* w/ filtering, handle padding
```
2020-03-19 16:35:54.532 11287-11337/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17628 ms
2020-03-19 16:35:54.534 11287-11337/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-2.7619956 -5.979765 9.770967 -4.0677695 -0.45775005
---
2020-03-19 16:36:12.203 11287-11337/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17663 ms
2020-03-19 16:36:12.203 11287-11337/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.99 huishou: 0.00 paishou: 0.00
1.3268473 -4.4506035 6.6752663 -4.716148 -1.0672847
```
* w/o filtering, do not handle padding
```
2020-03-19 16:31:11.846 10142-10251/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17604 ms
2020-03-19 16:31:11.848 10142-10251/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-3.0347927 -6.4339952 11.04803 -5.4549747 -0.3876967
---
2020-03-19 16:31:29.384 10142-10251/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17534 ms
2020-03-19 16:31:29.384 10142-10251/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
1.2168512 -4.368099 7.255885 -5.5144334 -1.1639248
```
* w/ filtering, do not handle padding
```
2020-03-19 16:28:24.086 9646-9711/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17217 ms
2020-03-19 16:28:24.088 9646-9711/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-3.1736987 -6.452322 11.297439 -5.4203343 -0.5534392
---
2020-03-19 16:28:41.358 9646-9711/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17269 ms
2020-03-19 16:28:41.358 9646-9711/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
0.86849236 -4.4576783 7.6404324 -5.487328 -1.2666371
```
#### huishou
* w/o filtering, handle padding (2 error)
```
2020-03-19 16:48:28.583 13295-13373/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17254 ms
2020-03-19 16:48:28.585 13295-13373/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.01 bicha: 0.05 dianzan: 0.00 huishou: 0.01 paishou: 0.93
-1.7331426 0.09876272 -2.3941803 -1.7338085 3.0251408
---
2020-03-19 16:48:45.778 13295-13373/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17191 ms
2020-03-19 16:48:45.778 13295-13373/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-3.879071 -4.1912184 6.3554544 -0.09690334 -1.114764
```
* w/ filtering, handle padding (2 error)
```
2020-03-19 16:38:04.412 11810-11857/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17662 ms
2020-03-19 16:38:04.414 11810-11857/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.01 bicha: 0.03 dianzan: 0.01 huishou: 0.01 paishou: 0.95
-2.007567 -0.38785794 -1.9487855 -1.5366914 3.18157
---
2020-03-19 16:38:22.086 11810-11857/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17671 ms
2020-03-19 16:38:22.087 11810-11857/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-3.8318145 -4.4191675 6.257308 0.24427156 -1.2220389
```
* w/o filtering, do not handle padding (2 error)
```
2020-03-19 16:52:14.489 13878-13939/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17584 ms
2020-03-19 16:52:14.491 13878-13939/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.02 dianzan: 0.01 huishou: 0.02 paishou: 0.94
-2.4309387 -0.7312908 -1.8063874 -0.894124 2.9229405
---
2020-03-19 16:52:32.067 13878-13939/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17575 ms
2020-03-19 16:52:32.068 13878-13939/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-3.9646165 -5.193593 7.9099545 -0.69758636 -1.3364815
```
* w/ filtering, do not handle padding (2 error)
```
2020-03-19 16:54:57.447 14452-14546/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17299 ms
2020-03-19 16:54:57.448 14452-14546/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.01 dianzan: 0.01 huishou: 0.02 paishou: 0.96
-2.6597798 -1.1633927 -1.2975652 -0.9528827 3.10506
---
2020-03-19 16:55:14.720 14452-14546/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17270 ms
2020-03-19 16:55:14.721 14452-14546/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-3.9690096 -5.240098 8.1345215 -0.66124177 -1.5276502
```
#### paishou
* w/o filtering, handle padding
```
2020-03-19 17:06:28.617 16753-16804/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17226 ms
2020-03-19 17:06:28.619 16753-16804/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 1.00
-0.7146892 -4.9998527 -3.5601838 -8.590016 10.120442
---
2020-03-19 17:06:45.815 16753-16804/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17193 ms
2020-03-19 17:06:45.815 16753-16804/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.24 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.76
3.3429859 -4.44104 -1.9742515 -6.1141315 4.5181727
```
* w/ filtering, handle padding
```
2020-03-19 17:08:21.723 17226-17274/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17675 ms
2020-03-19 17:08:21.725 17226-17274/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 1.00
-1.0050673 -5.341776 -3.403727 -8.62392 10.419296
---
2020-03-19 17:08:39.342 17226-17274/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17615 ms
2020-03-19 17:08:39.342 17226-17274/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.18 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.82
3.082263 -4.4686627 -1.8518269 -6.0482225 4.5968513
```
* w/o filtering, do not handle padding(1 error)
```
2020-03-19 17:02:49.643 15833-16008/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17528 ms
2020-03-19 17:02:49.645 15833-16008/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 1.00
-0.07100439 -5.2932553 -3.30046 -8.410997 9.580236
---
2020-03-19 17:03:07.208 15833-16008/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17562 ms
2020-03-19 17:03:07.208 15833-16008/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.53 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.47
3.5522506 -4.2854466 -1.3597873 -5.426591 3.4347508
```
* w/ filtering, do not handle padding
```
2020-03-19 16:58:32.781 15011-15234/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17200 ms
2020-03-19 16:58:32.783 15011-15234/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 1.00
-0.38265234 -5.651597 -3.0518162 -8.482908 9.863049
---
2020-03-19 16:58:50.070 15011-15234/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17285 ms
2020-03-19 16:58:50.070 15011-15234/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.40 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.60
3.2694476 -4.363732 -1.3590276 -5.4234347 3.673405
```
## diff map abs for each category(failed)
#### huishou
* w/ filtering, handle padding (2 error)
## use native library for max operation
* using `cwiseMax()` ==> from 3.092883 to 2.667297
* eliminate redundant storage ==> 2.669143 (not faster than previous one)
## calculate overhead time v.s. multiplication time
#### conv1
* `baseline` conv_time: 2.766262 (==mul_time: 1.116753==)
* 1.649509 for other computation
* `opt` conv_time: 2.673193(centroid_time: 0.000241, mul_time: 0.299802 ==> ==total mul: 0.300043==)
* 2.37315 for other computation (others: 1.649509 & ==overhead: 0.723641==)
* opt mul: total mul + overhead = 1.023684
* speedup: 1.09x
:::info
**[baseline computation time on each conv layer]**
**conv1**
mul_time: 1.116753
conv_time: 2.766262
**conv2**
mul_time: 5.571967
conv_time: 9.118006
**conv3a**
mul_time: 1.394493
conv_time: 2.201670
**conv3b**
mul_time: 1.392399
conv_time: 2.195430
**conv4a**
mul_time: 0.182152
conv_time: 0.268335
**conv4b**
mul_time: 0.176973
conv_time: 0.263688
**conv5a**
mul_time: 0.032407
conv_time: 0.043567
**conv5b**
mul_time: 0.033147
conv_time: 0.044328
:::
## temporal approximation only (no deep reuse on spatial)
#### time measurement on conv1, handle padding, w/ filtering
* `opt` conv_time: 2.678865 (==mul_time: 0.685311==)
* 1.993554 for other computation (others: 1.649509 & ==overhead: 0.344045==)
* opt mul: total mul + overhead = 1.029356
* speedup: 1.084x
#### time measurement on conv1, not handle padding, w/ filtering
* `opt` conv_time: 2.398170 (==mul_time: 0.496109==)
* 1.902061 for other computation (others: 1.649509 & ==overhead: 0.252552==)
* opt mul: total mul + overhead = 0.748661
* speedup: 1.49x
* note that the overhead become smaller here may be caused by less memory access during multiplication?!
#### time measurement on conv1, handle padding, w/o filtering
* `opt` conv_time: 2.519957 (==mul_time: 0.687789==)
* 1.832168 for other computation (others: 1.649509 & ==overhead: 0.182659==)
* opt mul: total mul + overhead = 0.870448
* speedup: 1.28x
#### time measurement on conv1, not handle padding, w/o filtering
* `opt` conv_time: 2.326129 (==mul_time: 0.497401==)
* 1.828728 for other computation (others: 1.649509 & ==overhead: 0.179219==)
* opt mul: total mul + overhead = 0.67662
* speedup: 1.65x
#### accuracy
* baoquan
handle padding, w/ filtering v
```
2020-03-20 00:07:28.248 32119-32168/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17273 ms
2020-03-20 00:07:28.250 32119-32168/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
18.988104 -6.876525 -2.79649 -11.483775 -4.296561
---
2020-03-20 00:07:45.466 32119-32168/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17215 ms
2020-03-20 00:07:45.466 32119-32168/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
19.36606 -7.5289164 -3.6660984 -11.397588 -3.7544327
```
handle padding, w/o filtering v
```
2020-03-20 00:05:29.545 31573-31640/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17019 ms
2020-03-20 00:05:29.547 31573-31640/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
19.040388 -6.823679 -2.829656 -11.465865 -4.353706
---
2020-03-20 00:05:46.477 31573-31640/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16928 ms
2020-03-20 00:05:46.477 31573-31640/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
19.48311 -7.5365644 -3.7633874 -11.490721 -3.713886
```
not handle padding, w/ filtering v
```
2020-03-20 00:01:18.148 30373-30555/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16696 ms
2020-03-20 00:01:18.150 30373-30555/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
18.556475 -6.3718977 -3.4288895 -11.718413 -4.030931
---
2020-03-20 00:01:34.765 30373-30555/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16613 ms
2020-03-20 00:01:34.765 30373-30555/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
19.575146 -7.568945 -3.55996 -11.447478 -4.001483
```
not handle padding, w/o filtering v
```
2020-03-20 00:03:22.020 30906-31065/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16707 ms
2020-03-20 00:03:22.022 30906-31065/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
18.635544 -6.2971067 -3.4610174 -11.730969 -4.1044803
---
2020-03-20 00:03:38.620 30906-31065/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16591 ms
2020-03-20 00:03:38.620 30906-31065/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 1.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
19.618286 -7.466488 -3.8337448 -11.552145 -3.8660233
```
---
* bicha
handle padding, w/ filtering v
```
2020-03-19 23:48:03.844 28090-28179/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17210 ms
2020-03-19 23:48:03.846 28090-28179/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 1.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
7.864481 19.159657 -19.197273 -19.248356 -3.1333013
---
2020-03-19 23:48:21.041 28090-28179/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17189 ms
2020-03-19 23:48:21.041 28090-28179/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 1.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
6.270033 14.281713 -13.977014 -11.244875 -4.492569
```
handle padding, w/o filtering v
```
2020-03-19 23:51:01.123 28618-28729/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16969 ms
2020-03-19 23:51:01.125 28618-28729/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 1.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
7.5942936 19.328796 -19.228094 -19.106167 -3.0694337
---
2020-03-19 23:51:18.055 28618-28729/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16929 ms
2020-03-19 23:51:18.056 28618-28729/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 1.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
6.243271 14.374965 -13.965516 -11.253829 -4.547383
```
not handle padding, w/ filtering v
```
2020-03-19 23:56:28.868 29758-29806/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16645 ms
2020-03-19 23:56:28.870 29758-29806/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 1.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
8.74413 19.750074 -19.988403 -20.445126 -3.430298
---
2020-03-19 23:56:45.504 29758-29806/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16633 ms
2020-03-19 23:56:45.504 29758-29806/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 1.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
6.302234 13.251124 -13.590159 -10.87592 -4.313585
```
not handle padding, w/o filtering v
```
2020-03-19 23:52:57.622 29252-29304/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16692 ms
2020-03-19 23:52:57.624 29252-29304/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 1.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
8.534599 19.981802 -20.054554 -20.413694 -3.4107683
---
2020-03-19 23:53:14.303 29252-29304/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16678 ms
2020-03-19 23:53:14.304 29252-29304/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 1.00 dianzan: 0.00 huishou: 0.00 paishou: 0.00
6.2881465 13.195517 -13.442431 -10.8005495 -4.404096
```
---
* dianzan
handle padding, w/ filtering v
```
2020-03-19 23:43:35.070 27437-27584/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17215 ms
2020-03-19 23:43:35.072 27437-27584/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-5.8762665 -9.032425 12.259109 -4.5643 1.1996974
---
2020-03-19 23:43:52.257 27437-27584/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17184 ms
2020-03-19 23:43:52.257 27437-27584/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.05 bicha: 0.00 dianzan: 0.72 huishou: 0.00 paishou: 0.23
0.50690556 -3.7669313 3.1295905 -4.547077 1.9674287
```
handle padding, w/o filtering v
```
2020-03-19 23:41:15.023 27024-27088/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16986 ms
2020-03-19 23:41:15.026 27024-27088/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-5.769293 -8.890699 11.75722 -4.656227 1.5616069
---
2020-03-19 23:41:31.959 27024-27088/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16932 ms
2020-03-19 23:41:31.960 27024-27088/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.08 bicha: 0.00 dianzan: 0.61 huishou: 0.00 paishou: 0.31
0.67880845 -3.6759315 2.7795389 -4.665579 2.0915055
```
not handle padding, w/ filtering v
```
2020-03-19 23:34:46.419 25797-25847/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16643 ms
2020-03-19 23:34:46.422 25797-25847/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-5.5164065 -9.036132 13.054678 -5.297441 0.7504471
---
2020-03-19 23:35:03.000 25797-25847/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16577 ms
2020-03-19 23:35:03.001 25797-25847/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.01 bicha: 0.00 dianzan: 0.98 huishou: 0.00 paishou: 0.01
0.2134631 -4.4193745 5.1705933 -4.8043556 0.9831741
```
not handle padding, w/o filtering v
```
2020-03-19 23:38:12.778 26312-26416/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16720 ms
2020-03-19 23:38:12.780 26312-26416/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 1.00 huishou: 0.00 paishou: 0.00
-5.408588 -8.865047 12.603862 -5.3320966 1.0349091
---
2020-03-19 23:38:29.406 26312-26416/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16620 ms
2020-03-19 23:38:29.407 26312-26416/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.01 bicha: 0.00 dianzan: 0.97 huishou: 0.00 paishou: 0.02
0.32421005 -4.387869 4.853078 -4.8415174 1.1464888
```
---
* huishou
handle padding, w/ filtering (1 error)
```
2020-03-19 23:06:51.241 21189-21395/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17173 ms
2020-03-19 23:06:51.243 21189-21395/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.00 huishou: 0.04 paishou: 0.96
-3.0142648 -2.52573 -2.0853171 0.31230456 3.5630658
---
2020-03-19 23:07:08.467 21189-21395/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17223 ms
2020-03-19 23:07:08.468 21189-21395/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.15 huishou: 0.84 paishou: 0.00
-5.089929 -5.4667673 2.9410071 4.634831 -1.4165484
```
handle padding, w/o filtering (1 error)
```
2020-03-19 23:15:20.477 22271-22395/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17051 ms
2020-03-19 23:15:20.479 22271-22395/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.00 huishou: 0.03 paishou: 0.97
-2.9261873 -2.066067 -2.2522957 0.01080966 3.6440465
---
2020-03-19 23:15:37.445 22271-22395/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16964 ms
2020-03-19 23:15:37.445 22271-22395/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.07 huishou: 0.93 paishou: 0.00
-5.1238194 -5.2276993 2.4491289 5.0811586 -1.6482404
```
not handle padding, w/ filtering (2 error)
```
2020-03-19 22:53:59.668 19937-20069/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16636 ms
2020-03-19 22:53:59.669 19937-20069/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.84 huishou: 0.16 paishou: 0.00
-5.375703 -5.585718 4.8860826 3.2091026 -1.2970212
---
2020-03-19 22:53:43.023 19937-20069/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16603 ms
2020-03-19 22:53:43.025 19937-20069/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.01 huishou: 0.12 paishou: 0.87
-4.120865 -2.6291118 -1.7150881 1.2244225 3.2438133
```
not handle padding, w/o filtering (2 error)
```
2020-03-19 23:18:30.849 22950-23032/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16742 ms
2020-03-19 23:18:30.851 22950-23032/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.00 huishou: 0.10 paishou: 0.89
-4.0122232 -2.3245504 -1.9339085 1.1202545 3.2552402
---
2020-03-19 23:18:47.465 22950-23032/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16613 ms
2020-03-19 23:18:47.466 22950-23032/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.73 huishou: 0.27 paishou: 0.00
-5.4311213 -5.444895 4.4636297 3.4854362 -1.3226463
```
---
* paishou
handle padding, w/ filtering v
```
2020-03-19 23:28:52.776 24810-24862/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17179 ms
2020-03-19 23:28:52.778 24810-24862/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 1.00
-2.1284926 -5.863654 -6.059702 -9.441758 13.260825
---
2020-03-19 23:29:09.968 24810-24862/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17188 ms
2020-03-19 23:29:09.969 24810-24862/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.12 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.88
3.6131642 -5.155533 -3.5373933 -6.2416368 5.631073
```
handle padding, w/o filtering v
```
2020-03-19 23:26:38.739 24189-24401/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 17010 ms
2020-03-19 23:26:38.742 24189-24401/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 1.00
-1.776947 -5.4918656 -6.20689 -9.343905 12.8883705
---
2020-03-19 23:26:55.639 24189-24401/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16891 ms
2020-03-19 23:26:55.639 24189-24401/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.08 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.92
3.4242587 -5.101674 -3.717747 -6.3197765 5.901647
```
not handle padding, w/ filtering v
```
2020-03-19 23:30:52.089 25175-25223/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16611 ms
2020-03-19 23:30:52.091 25175-25223/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 1.00
-1.0635355 -5.274775 -5.8502626 -8.909423 11.874141
---
2020-03-19 23:31:08.761 25175-25223/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16669 ms
2020-03-19 23:31:08.761 25175-25223/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.41 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.59
4.221181 -5.189563 -2.976827 -5.923399 4.579487
```
not handle padding, w/o filtering v
```
2020-03-19 23:23:47.346 23603-23774/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16719 ms
2020-03-19 23:23:47.348 23603-23774/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.00 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 1.00
-0.7493296 -5.0892735 -5.9334083 -8.768895 11.511698
---
2020-03-19 23:24:03.987 23603-23774/com.test.didi.mobilead I/Time: [DEBUG] Inference time: 16638 ms
2020-03-19 23:24:03.987 23603-23774/com.test.didi.mobilead I/Time: [DEBUG] predicted result: baoquan: 0.38 bicha: 0.00 dianzan: 0.00 huishou: 0.00 paishou: 0.62
4.1519814 -5.198289 -3.046839 -5.88623 4.6584992
```
### ==Result Moved to [here](https://docs.google.com/spreadsheets/d/1dBGLXYT0B1OHy2snz1U4-4l6rvbYmplr9xGjAAJq59A/edit?usp=sharing)==