Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
distiller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
distiller
Commits
8a869bec
Commit
8a869bec
authored
6 years ago
by
Neta Zmora
Browse files
Options
Downloads
Patches
Plain Diff
ResNet50 pruning: added a schedule to prune ResNet50 to 70%
parent
7193c526
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/agp-pruning/resnet50.schedule_agp.yaml
+155
-103
155 additions, 103 deletions
examples/agp-pruning/resnet50.schedule_agp.yaml
examples/agp-pruning/resnet50_pruning_for_accuracy.schedule_agp.yaml
+149
-0
149 additions, 0 deletions
...p-pruning/resnet50_pruning_for_accuracy.schedule_agp.yaml
with
304 additions
and
103 deletions
examples/agp-pruning/resnet50.schedule_agp.yaml
+
155
−
103
View file @
8a869bec
# This schedule demonstrates
low
-rate pruning (
2
6% sparsity)
acting as a regularizer to reduce the generalization error
#
of ResNet50 using the ImageNet dataset.
# Top
1 is 76.538 (=23.462 error rate) vs the published Top1: 76.15 (https://pytorch.org/docs/stable/torchvision/models.html)
# This schedule demonstrates
high
-rate
element-wise
pruning (
70.6
6% sparsity)
of Resnet 50.
#
Top1 is 76.09 vs the published Top1: 76.15 (https://pytorch.org/docs/stable/torchvision/models.html)
# Top
5 actually slightly improves the baseline: 92.95 vs. 92.87 in the baseline.
#
# I ran this for 80 epochs, but it can probably run for a much shorter time and prodcue the same results (50 epochs?)
# The first layers are left unpruned, because the weights tensors are very small. The arithmetic-intensity is
# especially low, and the weight tensors are large, in module.layer4.*, so it's important to prune those.
# The Linear (fully-connected) layer is pruned to 87% because we have empirical evidence that the classifier layers
# are prune-friendly.
#
# time python3 compress_classifier.py -a=resnet50 --pretrained -p=50 ../../../data.imagenet/ -j=22 --epochs=80 --lr=0.001 --compress=resnet50.schedule_agp.yaml
#
...
...
@@ -10,140 +13,189 @@
# +----+-------------------------------------+--------------------+---------------+----------------+------------+------------+----------+----------+----------+------------+---------+----------+------------+
# | | Name | Shape | NNZ (dense) | NNZ (sparse) | Cols (%) | Rows (%) | Ch (%) | 2D (%) | 3D (%) | Fine (%) | Std | Mean | Abs-Mean |
# |----+-------------------------------------+--------------------+---------------+----------------+------------+------------+----------+----------+----------+------------+---------+----------+------------|
# | 0 | module.conv1.weight | (64, 3, 7, 7) | 9408 | 9408 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.1
1423
| -0.0004
8
| 0.0
7023
|
# | 1 | module.layer1.0.conv1.weight | (64, 64, 1, 1) | 4096 |
984
| 0.00000 | 0.00000 |
3.12500 | 75.97656 | 7.81250 | 75.97656
| 0.0623
4
| -0.00
488
| 0.0
2488
|
# | 2 | module.layer1.0.conv2.weight | (64, 64, 3, 3) | 36864 |
8848
| 0.00000 | 0.00000 |
7.81250 | 33.88672 | 6.25000 | 75.99826
| 0.02
540
| 0.0006
4
| 0.01
024
|
# | 3 | module.layer1.0.conv3.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.0
3259
| 0.000
35
| 0.01
952
|
# | 4 | module.layer1.0.downsample.0.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.0
5311
| -0.00
314
| 0.02
976
|
# | 5 | module.layer1.1.conv1.weight | (64, 256, 1, 1) | 16384 |
5407
| 0.00000 | 0.00000 |
11.71875 | 66.99829 | 6.25000 | 66.99829
| 0.02
694
| 0.001
16
| 0.01
374
|
# | 6 | module.layer1.1.conv2.weight | (64, 64, 3, 3) | 36864 |
12166
| 0.00000 | 0.00000 |
6.25
000 |
16.6748
0 | 0.00000 |
66.99761
| 0.02
510
| 0.000
1
5 | 0.01
256
|
# | 7 | module.layer1.1.conv3.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.0
300
4 |
-
0.0000
7
| 0.01
880
|
# | 8 | module.layer1.2.conv1.weight | (64, 256, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02
775
| 0.000
12
| 0.0
2005
|
# | 9 | module.layer1.2.conv2.weight | (64, 64, 3, 3) | 36864 | 36864 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02
927
| -0.000
69
| 0.0
2
19
0
|
# | 10 | module.layer1.2.conv3.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02
861
| -0.00
222
| 0.01
712
|
# | 11 | module.layer2.0.conv1.weight | (128, 256, 1, 1) | 32768 |
10814
| 0.00000 | 0.00000 | 0.00000 |
66.99829
| 0.00000 |
66.99829
| 0.0
3077
| -0.00121 | 0.0
1567
|
# | 12 | module.layer2.0.conv2.weight | (128, 128, 3, 3) | 147456 |
58983
| 0.00000 | 0.00000 | 0.00000 |
7.04
95
6
| 0.00000 |
5
9.999
59
| 0.01
9
42 | -0.000
3
2 | 0.0
1106
|
# | 13 | module.layer2.0.conv3.weight | (512, 128, 1, 1) | 65536 |
65536
| 0.00000 | 0.00000 | 0.00000 |
0.00000 | 0.00000
|
0.00000
| 0.02
581
|
-
0.
0
0001 | 0.01
597
|
# | 14 | module.layer2.0.downsample.0.weight | (512, 256, 1, 1) | 131072 |
43254
| 0.00000 | 0.00000 | 0.00000 | 6
6
.999
82
| 12.30469 | 6
6
.999
82
| 0.0
2055
| -0.0002
9
| 0.00
925
|
# | 15 | module.layer2.1.conv1.weight | (128, 512, 1, 1) | 65536 | 1
5729
| 0.00000 | 0.00000 | 1
3.28125
|
75
.999
45
| 0.00000 |
75
.999
45
| 0.01
449
| 0.0001
1
| 0.00
605
|
# | 16 | module.layer2.1.conv2.weight | (128, 128, 3, 3) | 147456 |
35390
| 0.00000 | 0.00000 | 0.00000 |
31.81763
| 0.00000 |
75
.9996
2
| 0.01
666
| 0.000
2
1 | 0.006
94
|
# | 17 | module.layer2.1.conv3.weight | (512, 128, 1, 1) | 65536 |
65536
| 0.00000 | 0.00000 | 0.00000 |
0.00000 | 0.00000 | 0.00000
| 0.0
2037
| -0.00
107
| 0.0
1159
|
# | 18 | module.layer2.2.conv1.weight | (128, 512, 1, 1) | 65536 |
65536
| 0.00000 | 0.00000 |
0.00000 | 0.00000
| 0.00000 |
0.00000
| 0.0
2152
| -0.000
70
| 0.0
1494
|
# | 19 | module.layer2.2.conv2.weight | (128, 128, 3, 3) | 147456 |
147456
| 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.01
991
| -0.000
26
| 0.0
1415
|
# | 20 | module.layer2.2.conv3.weight | (512, 128, 1, 1) | 65536 |
65536
| 0.00000 | 0.00000 | 0.00000 |
0.00000 | 0.00000 | 0.00000
| 0.0
2417
| -0.000
39
| 0.0
1701
|
# | 21 | module.layer2.3.conv1.weight | (128, 512, 1, 1) | 65536 |
65536
| 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.0
2241
| -0.000
8
3 | 0.0
1660
|
# | 22 | module.layer2.3.conv2.weight | (128, 128, 3, 3) | 147456 |
147456
| 0.00000 | 0.00000 | 0.00000 |
0.
00000
| 0.00000 |
0.00000
| 0.0
2064
| -0.000
59
| 0.0
1555
|
# | 23 | module.layer2.3.conv3.weight | (512, 128, 1, 1) | 65536 |
65536
| 0.00000 | 0.00000 | 0.00000 |
0.00000 | 0.00000 | 0.00000
| 0.0
2242
| -0.000
98
| 0.0
1548
|
# | 24 | module.layer3.0.conv1.weight | (256, 512, 1, 1) | 131072 | 3
1458
| 0.00000 | 0.00000 | 0.00000 |
75
.999
45
| 0.00000 |
75
.999
45
| 0.02
543
| -0.000
54
| 0.011
28
|
# | 25 | module.layer3.0.conv2.weight | (256, 256, 3, 3) | 589824 | 1
94642
| 0.00000 | 0.00000 | 0.00000 |
16.35742
| 0.00000 | 6
6
.999
99
| 0.01
480
| -0.000
26
| 0.00
767
|
# | 26 | module.layer3.0.conv3.weight | (1024, 256, 1, 1) | 262144 |
2621
44 | 0.00000 | 0.00000 | 0.00000 |
0.00000 | 0.00000 | 0.00000
| 0.0
215
3 | -0.000
34
| 0.0
1529
|
# | 27 | module.layer3.0.downsample.0.weight | (1024, 512, 1, 1) | 524288 |
524
28
8
| 0.00000 | 0.00000 | 0.00000 |
0.00000 | 0.00000 | 0.00000
| 0.01
485
| 0.0000
6
| 0.0
1016
|
# | 28 | module.layer3.1.conv1.weight | (256, 1024, 1, 1) | 262144 |
104858
| 0.00000 | 0.00000 | 4.
58984
|
5
9.999
85
| 0.00000 |
5
9.999
85
| 0.01
352
| -0.000
38
| 0.00
743
|
# | 29 | module.layer3.1.conv2.weight | (256, 256, 3, 3) | 589824 |
235930
| 0.00000 | 0.00000 | 0.00000 |
6.40717
| 0.00000 |
5
9.999
93
| 0.01
325
| -0.0001
7
| 0.00
739
|
# | 30 | module.layer3.1.conv3.weight | (1024, 256, 1, 1) | 262144 |
2621
44 | 0.00000 | 0.00000 | 0.00000 |
0.00000 | 0.00000 | 0.00000
| 0.01
890
| -0.000
9
7 | 0.0
1357
|
# | 31 | module.layer3.2.conv1.weight | (256, 1024, 1, 1) | 262144 |
2621
44 | 0.00000 | 0.00000 | 0.
00000 | 0.00000
| 0.00000 |
0.00000
| 0.01
459
| -0.000
4
6 | 0.0
1045
|
# | 32 | module.layer3.2.conv2.weight | (256, 256, 3, 3) | 589824 |
589824
| 0.00000 | 0.00000 | 0.00000 |
0.
00000
| 0.00000 |
0.00000
| 0.01
385
| -0.000
61
| 0.0
1041
|
# | 33 | module.layer3.2.conv3.weight | (1024, 256, 1, 1) | 262144 |
2621
44 | 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.0
0000
|
0.00000
| 0.01
762
| -0.000
69
| 0.0
128
9 |
# | 34 | module.layer3.3.conv1.weight | (256, 1024, 1, 1) | 262144 |
2621
44 | 0.00000 | 0.00000 | 0.
00000 | 0.00000
| 0.00000 |
0.00000
| 0.01
607
| -0.000
66
| 0.0
1190
|
# | 35 | module.layer3.3.conv2.weight | (256, 256, 3, 3) | 589824 |
589824
| 0.00000 | 0.00000 | 0.00000 |
0.
00000
| 0.00000 |
0.00000
| 0.01
379
| -0.000
6
6 | 0.0
1
055 |
# | 36 | module.layer3.3.conv3.weight | (1024, 256, 1, 1) | 262144 |
2621
44 | 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.0
0000
|
0.00000
| 0.01
686
| -0.00
102
| 0.0
1244
|
# | 37 | module.layer3.4.conv1.weight | (256, 1024, 1, 1) | 262144 |
2621
44 | 0.00000 | 0.00000 | 0.0
0000 | 0.00000
| 0.00000 |
0.00000
| 0.01
678
| -0.000
87
| 0.0
1263
|
# | 38 | module.layer3.4.conv2.weight | (256, 256, 3, 3) | 589824 |
589824
| 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.01
37
5 | -0.000
81
| 0.0
1
055 |
# | 39 | module.layer3.4.conv3.weight | (1024, 256, 1, 1) | 262144 |
2621
44 | 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.01
685
| -0.00
141
| 0.0
1242
|
# | 40 | module.layer3.5.conv1.weight | (256, 1024, 1, 1) | 262144 |
2621
44 | 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.01
826
| -0.000
79
| 0.0
1390
|
# | 41 | module.layer3.5.conv2.weight | (256, 256, 3, 3) | 589824 |
589824
| 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.01
409
| -0.0008
0
| 0.0
1082
|
# | 42 | module.layer3.5.conv3.weight | (1024, 256, 1, 1) | 262144 |
2621
44 | 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.0
0000
|
0.00000
| 0.01
791
| -0.00
203
| 0.0
1343
|
# | 43 | module.layer4.0.conv1.weight | (512, 1024, 1, 1) | 524288 |
209716
| 0.00000 | 0.00000 | 0.00000 |
5
9.9998
5
| 0.00000 |
5
9.9998
5
| 0.0
2063
| -0.000
79
| 0.0
1202
|
# | 44 | module.layer4.0.conv2.weight | (512, 512, 3, 3) | 2359296 |
94371
9 | 0.00000 | 0.00000 | 0.00000 |
10.43282
| 0.00000 |
5
9.9999
7
| 0.0
1083
| -0.000
3
2 | 0.00
638
|
# | 45 | module.layer4.0.conv3.weight | (2048, 512, 1, 1) | 1048576 |
1048
57
6
| 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.01
424
| -0.000
54
| 0.0
1098
|
# | 46 | module.layer4.0.downsample.0.weight | (2048, 1024, 1, 1) | 2097152 |
838861
| 0.00000 | 0.00000 | 0.00000 |
5
9.9999
9
| 0.00000 |
5
9.9999
9
| 0.00
8
70 | -0.0000
5
| 0.00
497
|
# | 47 | module.layer4.1.conv1.weight | (512, 2048, 1, 1) | 1048576 |
419431
| 0.00000 | 0.00000 | 0.00000 |
5
9.9999
4
| 0.00000 |
5
9.9999
4
| 0.01
288
| -0.000
56
| 0.00
753
|
# | 48 | module.layer4.1.conv2.weight | (512, 512, 3, 3) | 2359296 | 7
78568
| 0.00000 | 0.00000 | 0.00000 | 1
5.62958
| 0.00000 | 6
6
.99999 | 0.0
1029
| -0.000
52
| 0.00
561
|
# | 49 | module.layer4.1.conv3.weight | (2048, 512, 1, 1) | 1048576 |
1048
57
6
| 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.01
400
|
-
0.0000
8
| 0.0
1080
|
# | 50 | module.layer4.2.conv1.weight | (512, 2048, 1, 1) | 1048576 |
1048
57
6
| 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.01
694
| -0.000
39
| 0.0
1327
|
# | 51 | module.layer4.2.conv2.weight | (512, 512, 3, 3) | 2359296 |
2359296
| 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.0
1016
| -0.0005
9
| 0.00
804
|
# | 52 | module.layer4.2.conv3.weight | (2048, 512, 1, 1) | 1048576 |
1048
57
6
| 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.01
308
|
-
0.000
00
| 0.00
980
|
# | 53 | module.fc.weight | (1000, 2048) | 2048000 |
204800
0 | 0.
00000
| 0.00000 | 0.00000 | 0.00000 | 0.00000 |
0
.00000 | 0.0
328
8 | 0.00
000
| 0.0
226
9 |
# | 54 | Total sparsity: | - | 25502912 |
18871702
| 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 |
26.00178
| 0.00000 | 0.00000 | 0.00000 |
# | 0 | module.conv1.weight | (64, 3, 7, 7) | 9408 | 9408 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.1
0415
| -0.0004
3
| 0.0
6379
|
# | 1 | module.layer1.0.conv1.weight | (64, 64, 1, 1) | 4096 |
4096
| 0.00000 | 0.00000 |
0.00000 | 0.00000 | 0.00000 | 0.00000
| 0.06
0
23 | -0.00
354
| 0.0
3393
|
# | 2 | module.layer1.0.conv2.weight | (64, 64, 3, 3) | 36864 |
36864
| 0.00000 | 0.00000 |
0.00000 | 0.00000 | 0.00000 | 0.00000
| 0.02
438
| 0.0006
9
| 0.01
446
|
# | 3 | module.layer1.0.conv3.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.0
2961
| 0.000
29
| 0.01
786
|
# | 4 | module.layer1.0.downsample.0.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.0
4820
| -0.00
283
| 0.02
690
|
# | 5 | module.layer1.1.conv1.weight | (64, 256, 1, 1) | 16384 |
16384
| 0.00000 | 0.00000 |
0.00000 | 0.00000 | 0.00000 | 0.00000
| 0.02
557
| 0.001
02
| 0.01
698
|
# | 6 | module.layer1.1.conv2.weight | (64, 64, 3, 3) | 36864 |
36864
| 0.00000 | 0.00000 |
0.00
000 |
0.0000
0 | 0.00000 |
0.00000
| 0.02
391
| 0.000
0
5 | 0.01
633
|
# | 7 | module.layer1.1.conv3.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.0
272
4 |
0.0000
0
| 0.01
716
|
# | 8 | module.layer1.2.conv1.weight | (64, 256, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02
513
| 0.000
08
| 0.0
1828
|
# | 9 | module.layer1.2.conv2.weight | (64, 64, 3, 3) | 36864 | 36864 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02
638
| -0.000
52
| 0.019
79
|
# | 10 | module.layer1.2.conv3.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02
573
| -0.00
185
| 0.01
547
|
# | 11 | module.layer2.0.conv1.weight | (128, 256, 1, 1) | 32768 |
32768
| 0.00000 | 0.00000 | 0.00000 |
0.00000
| 0.00000 |
0.00000
| 0.0
2960
| -0.00121 | 0.0
2091
|
# | 12 | module.layer2.0.conv2.weight | (128, 128, 3, 3) | 147456 |
44237
| 0.00000 | 0.00000 | 0.00000 |
16.918
95 | 0.00000 |
6
9.999
86
| 0.01
6
42 | -0.0002
0
| 0.0
0819
|
# | 13 | module.layer2.0.conv3.weight | (512, 128, 1, 1) | 65536 |
19661
| 0.00000 | 0.00000 | 0.00000 |
69.99969 | 14.25781
|
69.99969
| 0.02
184
|
0.0001
2
| 0.01
003
|
# | 14 | module.layer2.0.downsample.0.weight | (512, 256, 1, 1) | 131072 |
39322
| 0.00000 | 0.00000 | 0.00000 | 6
9
.999
69
| 12.30469 | 6
9
.999
69
| 0.0
1788
| -0.0002
7
| 0.00
766
|
# | 15 | module.layer2.1.conv1.weight | (128, 512, 1, 1) | 65536 | 1
9661
| 0.00000 | 0.00000 | 1
2.69531
|
69
.999
69
| 0.00000 |
69
.999
69
| 0.01
306
| 0.
0
0001 | 0.00
590
|
# | 16 | module.layer2.1.conv2.weight | (128, 128, 3, 3) | 147456 |
44237
| 0.00000 | 0.00000 | 0.00000 |
22.08862
| 0.00000 |
69
.999
8
6 | 0.01
518
| 0.0001
3
| 0.006
88
|
# | 17 | module.layer2.1.conv3.weight | (512, 128, 1, 1) | 65536 |
19661
| 0.00000 | 0.00000 | 0.00000 |
69.99969 | 1.36719 | 69.99969
| 0.0
1769
| -0.00
086
| 0.0
0766
|
# | 18 | module.layer2.2.conv1.weight | (128, 512, 1, 1) | 65536 |
19661
| 0.00000 | 0.00000 |
1.56250 | 69.99969
| 0.00000 |
69.99969
| 0.0
1770
| -0.000
46
| 0.0
0840
|
# | 19 | module.layer2.2.conv2.weight | (128, 128, 3, 3) | 147456 |
44237
| 0.00000 | 0.00000 | 0.00000 |
13.09814
| 0.00000 |
69.99986
| 0.01
625
| -0.000
11
| 0.0
0781
|
# | 20 | module.layer2.2.conv3.weight | (512, 128, 1, 1) | 65536 |
19661
| 0.00000 | 0.00000 | 0.00000 |
69.99969 | 0.58594 | 69.99969
| 0.0
1985
| -0.000
20
| 0.0
0946
|
# | 21 | module.layer2.3.conv1.weight | (128, 512, 1, 1) | 65536 |
19661
| 0.00000 | 0.00000 | 0.00000 |
69.99969
| 0.00000 |
69.99969
| 0.0
1808
| -0.000
5
3 | 0.0
0894
|
# | 22 | module.layer2.3.conv2.weight | (128, 128, 3, 3) | 147456 |
44237
| 0.00000 | 0.00000 | 0.00000 |
1
0.
50415
| 0.00000 |
69.99986
| 0.0
1656
| -0.000
33
| 0.0
0830
|
# | 23 | module.layer2.3.conv3.weight | (512, 128, 1, 1) | 65536 |
19661
| 0.00000 | 0.00000 | 0.00000 |
69.99969 | 0.97656 | 69.99969
| 0.0
1864
| -0.000
55
| 0.0
0887
|
# | 24 | module.layer3.0.conv1.weight | (256, 512, 1, 1) | 131072 | 3
9322
| 0.00000 | 0.00000 | 0.00000 |
69
.999
69
| 0.00000 |
69
.999
69
| 0.02
308
| -0.000
61
| 0.011
19
|
# | 25 | module.layer3.0.conv2.weight | (256, 256, 3, 3) | 589824 | 1
76948
| 0.00000 | 0.00000 | 0.00000 |
20.91217
| 0.00000 | 6
9
.999
86
| 0.01
282
| -0.000
18
| 0.00
629
|
# | 26 | module.layer3.0.conv3.weight | (1024, 256, 1, 1) | 262144 |
786
44 | 0.00000 | 0.00000 | 0.00000 |
69.99969 | 4.29688 | 69.99969
| 0.0
176
3 | -0.000
12
| 0.0
0857
|
# | 27 | module.layer3.0.downsample.0.weight | (1024, 512, 1, 1) | 524288 |
157
28
7
| 0.00000 | 0.00000 | 0.00000 |
69.99989 | 3.90625 | 69.99989
| 0.01
221
| 0.0000
8
| 0.0
0570
|
# | 28 | module.layer3.1.conv1.weight | (256, 1024, 1, 1) | 262144 |
78644
| 0.00000 | 0.00000 | 4.
78516
|
6
9.999
69
| 0.00000 |
6
9.999
69
| 0.01
180
| -0.000
26
| 0.00
566
|
# | 29 | module.layer3.1.conv2.weight | (256, 256, 3, 3) | 589824 |
176948
| 0.00000 | 0.00000 | 0.00000 |
15.36255
| 0.00000 |
6
9.999
86
| 0.01
139
| -0.0001
0
| 0.00
554
|
# | 30 | module.layer3.1.conv3.weight | (1024, 256, 1, 1) | 262144 |
786
44 | 0.00000 | 0.00000 | 0.00000 |
69.99969 | 0.58594 | 69.99969
| 0.01
557
| -0.0007
4
| 0.0
0745
|
# | 31 | module.layer3.2.conv1.weight | (256, 1024, 1, 1) | 262144 |
786
44 | 0.00000 | 0.00000 | 0.
68359 | 69.99969
| 0.00000 |
69.99969
| 0.01
202
| -0.000
2
6 | 0.0
0573
|
# | 32 | module.layer3.2.conv2.weight | (256, 256, 3, 3) | 589824 |
176948
| 0.00000 | 0.00000 | 0.00000 |
1
0.
70709
| 0.00000 |
69.99986
| 0.01
117
| -0.000
38
| 0.0
0554
|
# | 33 | module.layer3.2.conv3.weight | (1024, 256, 1, 1) | 262144 |
786
44 | 0.00000 | 0.00000 | 0.00000 |
69.99969
| 0.0
9766
|
69.99969
| 0.01
439
| -0.000
38
| 0.0
069
9 |
# | 34 | module.layer3.3.conv1.weight | (256, 1024, 1, 1) | 262144 |
786
44 | 0.00000 | 0.00000 | 0.
19531 | 69.99969
| 0.00000 |
69.99969
| 0.01
311
| -0.000
34
| 0.0
0638
|
# | 35 | module.layer3.3.conv2.weight | (256, 256, 3, 3) | 589824 |
176948
| 0.00000 | 0.00000 | 0.00000 |
1
0.
32867
| 0.00000 |
69.99986
| 0.01
108
| -0.000
3
6 | 0.0055
6
|
# | 36 | module.layer3.3.conv3.weight | (1024, 256, 1, 1) | 262144 |
786
44 | 0.00000 | 0.00000 | 0.00000 |
69.99969
| 0.0
9766
|
69.99969
| 0.01
383
| -0.00
064
| 0.0
0677
|
# | 37 | module.layer3.4.conv1.weight | (256, 1024, 1, 1) | 262144 |
786
44 | 0.00000 | 0.00000 | 0.0
9766 | 69.99969
| 0.00000 |
69.99969
| 0.01
362
| -0.000
46
| 0.0
0669
|
# | 38 | module.layer3.4.conv2.weight | (256, 256, 3, 3) | 589824 |
176948
| 0.00000 | 0.00000 | 0.00000 |
11.27167
| 0.00000 |
69.99986
| 0.01
10
5 | -0.000
47
| 0.00
5
55 |
# | 39 | module.layer3.4.conv3.weight | (1024, 256, 1, 1) | 262144 |
786
44 | 0.00000 | 0.00000 | 0.00000 |
69.99969
| 0.00000 |
69.99969
| 0.01
387
| -0.00
094
| 0.0
0679
|
# | 40 | module.layer3.5.conv1.weight | (256, 1024, 1, 1) | 262144 |
786
44 | 0.00000 | 0.00000 | 0.00000 |
69.99969
| 0.00000 |
69.99969
| 0.01
472
| -0.000
40
| 0.0
0731
|
# | 41 | module.layer3.5.conv2.weight | (256, 256, 3, 3) | 589824 |
176948
| 0.00000 | 0.00000 | 0.00000 |
12.88605
| 0.00000 |
69.99986
| 0.01
132
| -0.000
4
8 | 0.0
0570
|
# | 42 | module.layer3.5.conv3.weight | (1024, 256, 1, 1) | 262144 |
786
44 | 0.00000 | 0.00000 | 0.00000 |
69.99969
| 0.0
9766
|
69.99969
| 0.01
475
| -0.00
139
| 0.0
0732
|
# | 43 | module.layer4.0.conv1.weight | (512, 1024, 1, 1) | 524288 |
157287
| 0.00000 | 0.00000 | 0.00000 |
6
9.9998
9
| 0.00000 |
6
9.9998
9
| 0.0
1754
| -0.000
53
| 0.0
0888
|
# | 44 | module.layer4.0.conv2.weight | (512, 512, 3, 3) | 2359296 |
70778
9 | 0.00000 | 0.00000 | 0.00000 |
23.35434
| 0.00000 |
6
9.9999
9
| 0.0
0915
| -0.0002
1
| 0.00
467
|
# | 45 | module.layer4.0.conv3.weight | (2048, 512, 1, 1) | 1048576 |
314
57
3
| 0.00000 | 0.00000 | 0.00000 |
69.99998
| 0.00000 |
69.99998
| 0.01
159
| -0.000
26
| 0.0
0580
|
# | 46 | module.layer4.0.downsample.0.weight | (2048, 1024, 1, 1) | 2097152 |
629146
| 0.00000 | 0.00000 | 0.00000 |
6
9.9999
8
| 0.00000 |
6
9.9999
8
| 0.007
6
0 | -0.0000
7
| 0.00
368
|
# | 47 | module.layer4.1.conv1.weight | (512, 2048, 1, 1) | 1048576 |
314573
| 0.00000 | 0.00000 | 0.00000 |
6
9.9999
8
| 0.00000 |
6
9.9999
8
| 0.01
140
| -0.000
33
| 0.00
571
|
# | 48 | module.layer4.1.conv2.weight | (512, 512, 3, 3) | 2359296 | 7
07789
| 0.00000 | 0.00000 | 0.00000 | 1
9.46831
| 0.00000 | 6
9
.99999 | 0.0
0904
| -0.000
44
| 0.00
462
|
# | 49 | module.layer4.1.conv3.weight | (2048, 512, 1, 1) | 1048576 |
314
57
3
| 0.00000 | 0.00000 | 0.00000 |
69.99998
| 0.00000 |
69.99998
| 0.01
152
|
0.0000
7
| 0.0
0575
|
# | 50 | module.layer4.2.conv1.weight | (512, 2048, 1, 1) | 1048576 |
314
57
3
| 0.00000 | 0.00000 | 0.00000 |
69.99998
| 0.00000 |
69.99998
| 0.01
368
| -0.000
14
| 0.0
0694
|
# | 51 | module.layer4.2.conv2.weight | (512, 512, 3, 3) | 2359296 |
707789
| 0.00000 | 0.00000 | 0.00000 |
38.29308
| 0.00000 |
69.99999
| 0.0
0789
| -0.000
3
5 | 0.00
409
|
# | 52 | module.layer4.2.conv3.weight | (2048, 512, 1, 1) | 1048576 |
314
57
3
| 0.00000 | 0.00000 | 0.00000 |
69.99998
| 0.00000 |
69.99998
| 0.01
075
|
0.000
16
| 0.00
524
|
# | 53 | module.fc.weight | (1000, 2048) | 2048000 |
26624
0 | 0.
19531
| 0.00000 | 0.00000 | 0.00000 | 0.00000 |
87
.00000 | 0.0
299
8 | 0.00
513
| 0.0
097
9 |
# | 54 | Total sparsity: | - | 25502912 |
7481351
| 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 |
70.66472
| 0.00000 | 0.00000 | 0.00000 |
# +----+-------------------------------------+--------------------+---------------+----------------+------------+------------+----------+----------+----------+------------+---------+----------+------------+
#
2018-09-20 11:14:10,977 -
Total sparsity:
26.00
# Total sparsity:
70.66
#
# 2018-
09-20 11:14:10,977
- --- validate (epoch=
80
)-----------
# 2018-
09-20 11:14:10,977
- 128116 samples (256 per mini-batch)
# 2018-
09-20 11:14:27,909
- Epoch: [
80
][ 50/ 500] Loss
0.958656
Top1 7
6.281250
Top5 9
1.539062
# 2018-
09-20 11:14:35,973
- Epoch: [
80
][ 100/ 500] Loss
0.971032
Top1 7
6.289062
Top5 9
1.375000
# 2018-
09-20 11:14:43,769
- Epoch: [
80
][ 150/ 500] Loss
0.965900
Top1 7
6.359375
Top5 9
1
.5
05208
# 2018-
09-20 11:14
:52,
185
- Epoch: [
80
][ 200/ 500] Loss
0.963459
Top1 7
6.472656
Top5 9
1.494141
# 2018-
09-20 11:15
:00,
467
- Epoch: [
80
][ 250/ 500] Loss
0.961311
Top1 7
6.48750
0 Top5 9
1
.5
54688
# 2018-
09-20 11:15
:08,73
0
- Epoch: [
80
][ 300/ 500] Loss
0.952356
Top1 7
6.649740
Top5 9
1.640625
# 2018-
09-20 11:15
:17,
016
- Epoch: [
80
][ 350/ 500] Loss
0.955011
Top1 7
6.588170
Top5 9
1.614955
# 2018-
09-20 11:15:25,533
- Epoch: [
80
][ 400/ 500] Loss
0.952346
Top1 7
6.601562
Top5 9
1.615234
# 2018-
09-20 11:15:34,59
7 - Epoch: [
80
][ 450/ 500] Loss
0.950455
Top1 7
6.662326
Top5 9
1.646701
# 2018-
09-20 11:15:42,484
- Epoch: [
80
][ 500/ 500] Loss
0.952648
Top1 7
6.621094
Top5 9
1.6304
69
# 2018-
09-20 11:15:42,554
- ==> Top1: 7
6.618
Top5: 9
1.629
Loss:
0.953
# 2018-
10-01 20:57:09,476
- --- validate (epoch=
95
)-----------
# 2018-
10-01 20:57:09,476
- 128116 samples (256 per mini-batch)
# 2018-
10-01 20:57:28,241
- Epoch: [
95
][ 50/ 500] Loss
1.044524
Top1 7
5.039062
Top5 9
0.968750
# 2018-
10-01 20:57:36,132
- Epoch: [
95
][ 100/ 500] Loss
1.057046
Top1 7
4.875000
Top5 9
0.699219
# 2018-
10-01 20:57:44,244
- Epoch: [
95
][ 150/ 500] Loss
1.066284
Top1 7
4.627604
Top5 9
0
.5
75521
# 2018-
10-01 20:57
:52,
479
- Epoch: [
95
][ 200/ 500] Loss
1.058866
Top1 7
4.718750
Top5 9
0.589844
# 2018-
10-01 20:58
:00,
566
- Epoch: [
95
][ 250/ 500] Loss
1.062525
Top1 7
4.53125
0 Top5 9
0
.5
40625
# 2018-
10-01 20:58
:08,7
7
3 - Epoch: [
95
][ 300/ 500] Loss
1.060124
Top1 7
4.542969
Top5 9
0.552083
# 2018-
10-01 20:58
:17,
233
- Epoch: [
95
][ 350/ 500] Loss
1.063018
Top1 7
4.493304
Top5 9
0.493304
# 2018-
10-01 20:58:24,937
- Epoch: [
95
][ 400/ 500] Loss
1.062629
Top1 7
4.418945
Top5 9
0.518555
# 2018-
10-01 20:58:33,46
7 - Epoch: [
95
][ 450/ 500] Loss
1.064152
Top1 7
4.388889
Top5 9
0.502604
# 2018-
10-01 20:58:41,221
- Epoch: [
95
][ 500/ 500] Loss
1.064142
Top1 7
4.372656
Top5 9
0.4929
69
# 2018-
10-01 20:58:41,290
- ==> Top1: 7
4.374
Top5: 9
0.496
Loss:
1.064
#
# 2018-09-20 11:15:42,643 - ==> Best Top1: 77.734 On Epoch: 1
# --- test ---------------------
# 50000 samples (256 per mini-batch)
# Test: [ 50/ 195] Loss 0.6
66113
Top1 82.
640
62
5
Top5 96.
125000
# Test: [ 100/ 195] Loss 0.
788863
Top1 79.
734375
Top5 9
5.066406
# Test: [ 150/ 195] Loss 0.9
00865
Top1 77.
450521
Top5 93.
656
25
0
# ==> Top1: 76.
538
Top5: 9
3.184
Loss: 0.9
43
# Test: [ 50/ 195] Loss 0.6
78497
Top1 82.
1015
62 Top5 96.
054688
# Test: [ 100/ 195] Loss 0.
801957
Top1 79.
386719
Top5 9
4.843750
# Test: [ 150/ 195] Loss 0.9
16142
Top1 77.
119792
Top5 93.
4531
25
# ==> Top1: 76.
086
Top5: 9
2.950
Loss: 0.9
60
version
:
1
pruners
:
low
_pruner
:
fc
_pruner
:
class
:
AutomatedGradualPruner
initial_sparsity
:
0.05
final_sparsity
:
0.60
weights
:
[
module.layer2.0.conv2.weight
,
module.layer3.1.conv1.weight
,
module.layer3.1.conv2.weight
,
module.layer4.0.conv1.weight
,
module.layer4.0.conv2.weight
,
module.layer4.0.downsample.0.weight
,
module.layer4.1.conv1.weight
]
final_sparsity
:
0.87
weights
:
module.fc.weight
mid_pruner
:
class
:
AutomatedGradualPruner
class
:
AutomatedGradualPruner
initial_sparsity
:
0.05
final_sparsity
:
0.67
weights
:
[
module.layer1.1.conv1.weight
,
module.layer1.1.conv2.weight
,
module.layer2.0.conv1.weight
,
module.layer2.0.downsample.0.weight
,
module.layer3.0.conv2.weight
,
module.layer4.1.conv2.weight
]
final_sparsity
:
0.70
weights
:
[
#module.conv1.weight,
#module.layer1.0.conv1.weight,
#module.layer1.0.conv2.weight,
#module.layer1.0.conv3.weight,
#module.layer1.0.downsample.0.weight,
#module.layer1.1.conv1.weight,
#module.layer1.1.conv2.weight,
#module.layer1.1.conv3.weight,
#module.layer1.2.conv1.weight,
#module.layer1.2.conv2.weight,
#module.layer1.2.conv3.weight,
#module.layer2.0.conv1.weight,
module.layer2.0.conv2.weight
,
module.layer2.0.conv3.weight
,
module.layer2.0.downsample.0.weight
,
module.layer2.1.conv1.weight
,
module.layer2.1.conv2.weight
,
module.layer2.1.conv3.weight
,
module.layer2.2.conv1.weight
,
module.layer2.2.conv2.weight
,
module.layer2.2.conv3.weight
,
module.layer2.3.conv1.weight
,
module.layer2.3.conv2.weight
,
module.layer2.3.conv3.weight
,
module.layer3.0.conv1.weight
,
module.layer3.0.conv2.weight
,
module.layer3.0.conv3.weight
,
module.layer3.0.downsample.0.weight
,
module.layer3.1.conv1.weight
,
module.layer3.1.conv2.weight
,
module.layer3.1.conv3.weight
,
module.layer3.2.conv1.weight
,
module.layer3.2.conv2.weight
,
module.layer3.2.conv3.weight
,
module.layer3.3.conv1.weight
,
module.layer3.3.conv2.weight
,
module.layer3.3.conv3.weight
,
module.layer3.4.conv1.weight
,
module.layer3.4.conv2.weight
,
module.layer3.4.conv3.weight
,
module.layer3.5.conv1.weight
,
module.layer3.5.conv2.weight
,
module.layer3.5.conv3.weight
,
module.layer4.0.conv1.weight
,
module.layer4.0.conv2.weight
,
module.layer4.0.conv3.weight
,
module.layer4.0.downsample.0.weight
,
#module.layer4.1.conv1.weight,
#module.layer4.1.conv2.weight,
module.layer4.1.conv3.weight
,
module.layer4.2.conv1.weight
,
module.layer4.2.conv2.weight
,
module.layer4.2.conv3.weight
]
high
_pruner
:
class
:
AutomatedGradualPruner
low
_pruner
:
class
:
AutomatedGradualPruner
initial_sparsity
:
0.05
final_sparsity
:
0.76
weights
:
[
module.layer1.0.conv1.weight
,
module.layer1.0.conv2.weight
,
module.layer2.1.conv1.weight
,
module.layer2.1.conv2.weight
,
module.layer3.0.conv1.weight
]
final_sparsity
:
0.70
weights
:
[
module.layer4.1.conv1.weight
,
module.layer4.1.conv2.weight
]
lr_schedulers
:
pruning_lr
:
class
:
ExponentialLR
gamma
:
0.9
gamma
:
0.9
5
policies
:
-
pruner
:
instance_name
:
low_pruner
starting_epoch
:
0
ending_epoch
:
16
ending_epoch
:
30
frequency
:
2
-
pruner
:
instance_name
:
mid_pruner
starting_epoch
:
4
ending_epoch
:
16
starting_epoch
:
0
ending_epoch
:
30
frequency
:
2
-
pruner
:
instance_name
:
high
_pruner
starting_epoch
:
4
ending_epoch
:
16
instance_name
:
fc
_pruner
starting_epoch
:
1
ending_epoch
:
29
frequency
:
2
-
lr_scheduler
:
instance_name
:
pruning_lr
starting_epoch
:
13
starting_epoch
:
40
ending_epoch
:
100
frequency
:
1
This diff is collapsed.
Click to expand it.
examples/agp-pruning/resnet50_pruning_for_accuracy.schedule_agp.yaml
0 → 100755
+
149
−
0
View file @
8a869bec
# This schedule demonstrates low-rate pruning (26% sparsity) acting as a regularizer to reduce the generalization error
# of ResNet50 using the ImageNet dataset.
# Top1 is 76.538 (=23.462 error rate) vs the published Top1: 76.15 (https://pytorch.org/docs/stable/torchvision/models.html)
#
# I ran this for 80 epochs, but it can probably run for a much shorter time and prodcue the same results (50 epochs?)
#
# time python3 compress_classifier.py -a=resnet50 --pretrained -p=50 ../../../data.imagenet/ -j=22 --epochs=80 --lr=0.001 --compress=resnet50.schedule_agp.yaml
#
# Parameters:
# +----+-------------------------------------+--------------------+---------------+----------------+------------+------------+----------+----------+----------+------------+---------+----------+------------+
# | | Name | Shape | NNZ (dense) | NNZ (sparse) | Cols (%) | Rows (%) | Ch (%) | 2D (%) | 3D (%) | Fine (%) | Std | Mean | Abs-Mean |
# |----+-------------------------------------+--------------------+---------------+----------------+------------+------------+----------+----------+----------+------------+---------+----------+------------|
# | 0 | module.conv1.weight | (64, 3, 7, 7) | 9408 | 9408 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.11423 | -0.00048 | 0.07023 |
# | 1 | module.layer1.0.conv1.weight | (64, 64, 1, 1) | 4096 | 984 | 0.00000 | 0.00000 | 3.12500 | 75.97656 | 7.81250 | 75.97656 | 0.06234 | -0.00488 | 0.02488 |
# | 2 | module.layer1.0.conv2.weight | (64, 64, 3, 3) | 36864 | 8848 | 0.00000 | 0.00000 | 7.81250 | 33.88672 | 6.25000 | 75.99826 | 0.02540 | 0.00064 | 0.01024 |
# | 3 | module.layer1.0.conv3.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.03259 | 0.00035 | 0.01952 |
# | 4 | module.layer1.0.downsample.0.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.05311 | -0.00314 | 0.02976 |
# | 5 | module.layer1.1.conv1.weight | (64, 256, 1, 1) | 16384 | 5407 | 0.00000 | 0.00000 | 11.71875 | 66.99829 | 6.25000 | 66.99829 | 0.02694 | 0.00116 | 0.01374 |
# | 6 | module.layer1.1.conv2.weight | (64, 64, 3, 3) | 36864 | 12166 | 0.00000 | 0.00000 | 6.25000 | 16.67480 | 0.00000 | 66.99761 | 0.02510 | 0.00015 | 0.01256 |
# | 7 | module.layer1.1.conv3.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.03004 | -0.00007 | 0.01880 |
# | 8 | module.layer1.2.conv1.weight | (64, 256, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02775 | 0.00012 | 0.02005 |
# | 9 | module.layer1.2.conv2.weight | (64, 64, 3, 3) | 36864 | 36864 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02927 | -0.00069 | 0.02190 |
# | 10 | module.layer1.2.conv3.weight | (256, 64, 1, 1) | 16384 | 16384 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02861 | -0.00222 | 0.01712 |
# | 11 | module.layer2.0.conv1.weight | (128, 256, 1, 1) | 32768 | 10814 | 0.00000 | 0.00000 | 0.00000 | 66.99829 | 0.00000 | 66.99829 | 0.03077 | -0.00121 | 0.01567 |
# | 12 | module.layer2.0.conv2.weight | (128, 128, 3, 3) | 147456 | 58983 | 0.00000 | 0.00000 | 0.00000 | 7.04956 | 0.00000 | 59.99959 | 0.01942 | -0.00032 | 0.01106 |
# | 13 | module.layer2.0.conv3.weight | (512, 128, 1, 1) | 65536 | 65536 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02581 | -0.00001 | 0.01597 |
# | 14 | module.layer2.0.downsample.0.weight | (512, 256, 1, 1) | 131072 | 43254 | 0.00000 | 0.00000 | 0.00000 | 66.99982 | 12.30469 | 66.99982 | 0.02055 | -0.00029 | 0.00925 |
# | 15 | module.layer2.1.conv1.weight | (128, 512, 1, 1) | 65536 | 15729 | 0.00000 | 0.00000 | 13.28125 | 75.99945 | 0.00000 | 75.99945 | 0.01449 | 0.00011 | 0.00605 |
# | 16 | module.layer2.1.conv2.weight | (128, 128, 3, 3) | 147456 | 35390 | 0.00000 | 0.00000 | 0.00000 | 31.81763 | 0.00000 | 75.99962 | 0.01666 | 0.00021 | 0.00694 |
# | 17 | module.layer2.1.conv3.weight | (512, 128, 1, 1) | 65536 | 65536 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02037 | -0.00107 | 0.01159 |
# | 18 | module.layer2.2.conv1.weight | (128, 512, 1, 1) | 65536 | 65536 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02152 | -0.00070 | 0.01494 |
# | 19 | module.layer2.2.conv2.weight | (128, 128, 3, 3) | 147456 | 147456 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01991 | -0.00026 | 0.01415 |
# | 20 | module.layer2.2.conv3.weight | (512, 128, 1, 1) | 65536 | 65536 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02417 | -0.00039 | 0.01701 |
# | 21 | module.layer2.3.conv1.weight | (128, 512, 1, 1) | 65536 | 65536 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02241 | -0.00083 | 0.01660 |
# | 22 | module.layer2.3.conv2.weight | (128, 128, 3, 3) | 147456 | 147456 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02064 | -0.00059 | 0.01555 |
# | 23 | module.layer2.3.conv3.weight | (512, 128, 1, 1) | 65536 | 65536 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02242 | -0.00098 | 0.01548 |
# | 24 | module.layer3.0.conv1.weight | (256, 512, 1, 1) | 131072 | 31458 | 0.00000 | 0.00000 | 0.00000 | 75.99945 | 0.00000 | 75.99945 | 0.02543 | -0.00054 | 0.01128 |
# | 25 | module.layer3.0.conv2.weight | (256, 256, 3, 3) | 589824 | 194642 | 0.00000 | 0.00000 | 0.00000 | 16.35742 | 0.00000 | 66.99999 | 0.01480 | -0.00026 | 0.00767 |
# | 26 | module.layer3.0.conv3.weight | (1024, 256, 1, 1) | 262144 | 262144 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.02153 | -0.00034 | 0.01529 |
# | 27 | module.layer3.0.downsample.0.weight | (1024, 512, 1, 1) | 524288 | 524288 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01485 | 0.00006 | 0.01016 |
# | 28 | module.layer3.1.conv1.weight | (256, 1024, 1, 1) | 262144 | 104858 | 0.00000 | 0.00000 | 4.58984 | 59.99985 | 0.00000 | 59.99985 | 0.01352 | -0.00038 | 0.00743 |
# | 29 | module.layer3.1.conv2.weight | (256, 256, 3, 3) | 589824 | 235930 | 0.00000 | 0.00000 | 0.00000 | 6.40717 | 0.00000 | 59.99993 | 0.01325 | -0.00017 | 0.00739 |
# | 30 | module.layer3.1.conv3.weight | (1024, 256, 1, 1) | 262144 | 262144 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01890 | -0.00097 | 0.01357 |
# | 31 | module.layer3.2.conv1.weight | (256, 1024, 1, 1) | 262144 | 262144 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01459 | -0.00046 | 0.01045 |
# | 32 | module.layer3.2.conv2.weight | (256, 256, 3, 3) | 589824 | 589824 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01385 | -0.00061 | 0.01041 |
# | 33 | module.layer3.2.conv3.weight | (1024, 256, 1, 1) | 262144 | 262144 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01762 | -0.00069 | 0.01289 |
# | 34 | module.layer3.3.conv1.weight | (256, 1024, 1, 1) | 262144 | 262144 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01607 | -0.00066 | 0.01190 |
# | 35 | module.layer3.3.conv2.weight | (256, 256, 3, 3) | 589824 | 589824 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01379 | -0.00066 | 0.01055 |
# | 36 | module.layer3.3.conv3.weight | (1024, 256, 1, 1) | 262144 | 262144 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01686 | -0.00102 | 0.01244 |
# | 37 | module.layer3.4.conv1.weight | (256, 1024, 1, 1) | 262144 | 262144 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01678 | -0.00087 | 0.01263 |
# | 38 | module.layer3.4.conv2.weight | (256, 256, 3, 3) | 589824 | 589824 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01375 | -0.00081 | 0.01055 |
# | 39 | module.layer3.4.conv3.weight | (1024, 256, 1, 1) | 262144 | 262144 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01685 | -0.00141 | 0.01242 |
# | 40 | module.layer3.5.conv1.weight | (256, 1024, 1, 1) | 262144 | 262144 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01826 | -0.00079 | 0.01390 |
# | 41 | module.layer3.5.conv2.weight | (256, 256, 3, 3) | 589824 | 589824 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01409 | -0.00080 | 0.01082 |
# | 42 | module.layer3.5.conv3.weight | (1024, 256, 1, 1) | 262144 | 262144 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01791 | -0.00203 | 0.01343 |
# | 43 | module.layer4.0.conv1.weight | (512, 1024, 1, 1) | 524288 | 209716 | 0.00000 | 0.00000 | 0.00000 | 59.99985 | 0.00000 | 59.99985 | 0.02063 | -0.00079 | 0.01202 |
# | 44 | module.layer4.0.conv2.weight | (512, 512, 3, 3) | 2359296 | 943719 | 0.00000 | 0.00000 | 0.00000 | 10.43282 | 0.00000 | 59.99997 | 0.01083 | -0.00032 | 0.00638 |
# | 45 | module.layer4.0.conv3.weight | (2048, 512, 1, 1) | 1048576 | 1048576 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01424 | -0.00054 | 0.01098 |
# | 46 | module.layer4.0.downsample.0.weight | (2048, 1024, 1, 1) | 2097152 | 838861 | 0.00000 | 0.00000 | 0.00000 | 59.99999 | 0.00000 | 59.99999 | 0.00870 | -0.00005 | 0.00497 |
# | 47 | module.layer4.1.conv1.weight | (512, 2048, 1, 1) | 1048576 | 419431 | 0.00000 | 0.00000 | 0.00000 | 59.99994 | 0.00000 | 59.99994 | 0.01288 | -0.00056 | 0.00753 |
# | 48 | module.layer4.1.conv2.weight | (512, 512, 3, 3) | 2359296 | 778568 | 0.00000 | 0.00000 | 0.00000 | 15.62958 | 0.00000 | 66.99999 | 0.01029 | -0.00052 | 0.00561 |
# | 49 | module.layer4.1.conv3.weight | (2048, 512, 1, 1) | 1048576 | 1048576 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01400 | -0.00008 | 0.01080 |
# | 50 | module.layer4.2.conv1.weight | (512, 2048, 1, 1) | 1048576 | 1048576 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01694 | -0.00039 | 0.01327 |
# | 51 | module.layer4.2.conv2.weight | (512, 512, 3, 3) | 2359296 | 2359296 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01016 | -0.00059 | 0.00804 |
# | 52 | module.layer4.2.conv3.weight | (2048, 512, 1, 1) | 1048576 | 1048576 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.01308 | -0.00000 | 0.00980 |
# | 53 | module.fc.weight | (1000, 2048) | 2048000 | 2048000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.03288 | 0.00000 | 0.02269 |
# | 54 | Total sparsity: | - | 25502912 | 18871702 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 0.00000 | 26.00178 | 0.00000 | 0.00000 | 0.00000 |
# +----+-------------------------------------+--------------------+---------------+----------------+------------+------------+----------+----------+----------+------------+---------+----------+------------+
# 2018-09-20 11:14:10,977 - Total sparsity: 26.00
#
# 2018-09-20 11:14:10,977 - --- validate (epoch=80)-----------
# 2018-09-20 11:14:10,977 - 128116 samples (256 per mini-batch)
# 2018-09-20 11:14:27,909 - Epoch: [80][ 50/ 500] Loss 0.958656 Top1 76.281250 Top5 91.539062
# 2018-09-20 11:14:35,973 - Epoch: [80][ 100/ 500] Loss 0.971032 Top1 76.289062 Top5 91.375000
# 2018-09-20 11:14:43,769 - Epoch: [80][ 150/ 500] Loss 0.965900 Top1 76.359375 Top5 91.505208
# 2018-09-20 11:14:52,185 - Epoch: [80][ 200/ 500] Loss 0.963459 Top1 76.472656 Top5 91.494141
# 2018-09-20 11:15:00,467 - Epoch: [80][ 250/ 500] Loss 0.961311 Top1 76.487500 Top5 91.554688
# 2018-09-20 11:15:08,730 - Epoch: [80][ 300/ 500] Loss 0.952356 Top1 76.649740 Top5 91.640625
# 2018-09-20 11:15:17,016 - Epoch: [80][ 350/ 500] Loss 0.955011 Top1 76.588170 Top5 91.614955
# 2018-09-20 11:15:25,533 - Epoch: [80][ 400/ 500] Loss 0.952346 Top1 76.601562 Top5 91.615234
# 2018-09-20 11:15:34,597 - Epoch: [80][ 450/ 500] Loss 0.950455 Top1 76.662326 Top5 91.646701
# 2018-09-20 11:15:42,484 - Epoch: [80][ 500/ 500] Loss 0.952648 Top1 76.621094 Top5 91.630469
# 2018-09-20 11:15:42,554 - ==> Top1: 76.618 Top5: 91.629 Loss: 0.953
#
# 2018-09-20 11:15:42,643 - ==> Best Top1: 77.734 On Epoch: 1
# --- test ---------------------
# 50000 samples (256 per mini-batch)
# Test: [ 50/ 195] Loss 0.666113 Top1 82.640625 Top5 96.125000
# Test: [ 100/ 195] Loss 0.788863 Top1 79.734375 Top5 95.066406
# Test: [ 150/ 195] Loss 0.900865 Top1 77.450521 Top5 93.656250
# ==> Top1: 76.538 Top5: 93.184 Loss: 0.943
version
:
1
pruners
:
low_pruner
:
class
:
AutomatedGradualPruner
initial_sparsity
:
0.05
final_sparsity
:
0.60
weights
:
[
module.layer2.0.conv2.weight
,
module.layer3.1.conv1.weight
,
module.layer3.1.conv2.weight
,
module.layer4.0.conv1.weight
,
module.layer4.0.conv2.weight
,
module.layer4.0.downsample.0.weight
,
module.layer4.1.conv1.weight
]
mid_pruner
:
class
:
AutomatedGradualPruner
initial_sparsity
:
0.05
final_sparsity
:
0.67
weights
:
[
module.layer1.1.conv1.weight
,
module.layer1.1.conv2.weight
,
module.layer2.0.conv1.weight
,
module.layer2.0.downsample.0.weight
,
module.layer3.0.conv2.weight
,
module.layer4.1.conv2.weight
]
high_pruner
:
class
:
AutomatedGradualPruner
initial_sparsity
:
0.05
final_sparsity
:
0.76
weights
:
[
module.layer1.0.conv1.weight
,
module.layer1.0.conv2.weight
,
module.layer2.1.conv1.weight
,
module.layer2.1.conv2.weight
,
module.layer3.0.conv1.weight
]
lr_schedulers
:
pruning_lr
:
class
:
ExponentialLR
gamma
:
0.9
policies
:
-
pruner
:
instance_name
:
low_pruner
starting_epoch
:
0
ending_epoch
:
16
frequency
:
2
-
pruner
:
instance_name
:
mid_pruner
starting_epoch
:
4
ending_epoch
:
16
frequency
:
2
-
pruner
:
instance_name
:
high_pruner
starting_epoch
:
4
ending_epoch
:
16
frequency
:
2
-
lr_scheduler
:
instance_name
:
pruning_lr
starting_epoch
:
13
ending_epoch
:
100
frequency
:
1
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment