Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace add_missing_layers with add_missing_container_layers #169

Merged
merged 6 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/test_output/container.out
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ ContainerModule [1, 5] --
│ │ │ └─Linear: 4-1 [1, 5] 30
│ │ │ └─Linear: 4-2 [1, 5] 30
│ │ └─Linear: 3-2 [1, 5] 30
│ │ └─Sequential: 3 -- --
│ │ └─Sequential: 3-3 -- (recursive)
│ │ │ └─Linear: 4-3 [1, 5] (recursive)
│ │ │ └─Linear: 4-4 [1, 5] (recursive)
│ │ └─Sequential: 3-3 [1, 5] (recursive)
│ │ └─Sequential: 3-4 [1, 5] (recursive)
│ │ │ └─Linear: 4-5 [1, 5] (recursive)
│ │ │ └─Linear: 4-6 [1, 5] (recursive)
│ │ │ └─Linear: 4-7 [1, 5] (recursive)
Expand All @@ -38,7 +38,8 @@ ContainerModule [5] --
│ └─ContainerChildModule: 2-2 [5] --
│ │ └─Sequential: 3-1 [5] 60
│ │ └─Linear: 3-2 [5] 30
│ │ └─Sequential: 3-3 [5] (recursive)
│ │ └─Sequential: 3-3 -- (recursive)
│ │ └─Sequential: 3-4 [5] (recursive)
│ └─Linear: 2-3 [5] 30
==========================================================================================
Total params: 150
Expand Down
26 changes: 6 additions & 20 deletions tests/test_output/google.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
==========================================================================================
Layer (type:depth-idx) Output Shape Param #
==========================================================================================
GoogLeNet [1, 1000] --
GoogLeNet [1, 1000] 6,379,984
├─BasicConv2d: 1-1 [1, 64, 56, 56] --
│ └─Conv2d: 2-1 [1, 64, 56, 56] 9,408
│ └─BatchNorm2d: 2-2 [1, 64, 56, 56] 128
Expand Down Expand Up @@ -222,23 +222,9 @@ GoogLeNet [1, 1000] --
│ │ └─BasicConv2d: 3-72 [1, 128, 4, 4] --
│ │ │ └─Conv2d: 4-89 [1, 128, 4, 4] 106,496
│ │ │ └─BatchNorm2d: 4-90 [1, 128, 4, 4] 256
├─InceptionAux: 1-17 -- --
│ └─BasicConv2d: 2-43 -- --
│ │ └─Conv2d: 3-73 -- 65,536
│ │ └─BatchNorm2d: 3-74 -- 256
│ └─Linear: 2-44 -- 2,098,176
│ └─Linear: 2-45 -- 1,025,000
│ └─Dropout: 2-46 -- --
├─InceptionAux: 1-18 -- --
│ └─BasicConv2d: 2-47 -- --
│ │ └─Conv2d: 3-75 -- 67,584
│ │ └─BatchNorm2d: 3-76 -- 256
│ └─Linear: 2-48 -- 2,098,176
│ └─Linear: 2-49 -- 1,025,000
│ └─Dropout: 2-50 -- --
├─AdaptiveAvgPool2d: 1-19 [1, 1024, 1, 1] --
├─Dropout: 1-20 [1, 1024] --
├─Linear: 1-21 [1, 1000] 1,025,000
├─AdaptiveAvgPool2d: 1-17 [1, 1024, 1, 1] --
├─Dropout: 1-18 [1, 1024] --
├─Linear: 1-19 [1, 1000] 1,025,000
==========================================================================================
Total params: 13,004,888
Trainable params: 13,004,888
Expand All @@ -247,8 +233,8 @@ Total mult-adds (M): 384.08
==========================================================================================
Input size (MB): 0.15
Forward/backward pass size (MB): 13.05
Params size (MB): 52.02
Estimated Total Size (MB): 65.22
Params size (MB): 26.50
Estimated Total Size (MB): 39.70
==========================================================================================
==========================================================================================
Layer (type:depth-idx) Output Shape Param #
Expand Down
6 changes: 2 additions & 4 deletions tests/test_output/module_dict.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ Layer (type:depth-idx) Output Shape Param #
ModuleDictModel [1, 10, 1, 1] --
├─ModuleDict: 1-1 -- --
│ └─Conv2d: 2-1 [1, 10, 1, 1] 910
│ └─MaxPool2d: 2-2 -- --
├─ModuleDict: 1-2 -- --
│ └─LeakyReLU: 2-3 [1, 10, 1, 1] --
│ └─PReLU: 2-4 -- 1
TylerYep marked this conversation as resolved.
Show resolved Hide resolved
├─ModuleDict: 1-2 -- 1
│ └─LeakyReLU: 2-2 [1, 10, 1, 1] --
==========================================================================================
Total params: 911
Trainable params: 911
Expand Down
9 changes: 3 additions & 6 deletions tests/test_output/parameter_list.out
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
================================================================================================================================================================
Layer (type:depth-idx) Kernel Shape Input Shape Output Shape Param # Mult-Adds Trainable
================================================================================================================================================================
ParameterListModel -- [100, 100] [100, 100] -- -- True
├─ParameterList: 1-1 -- -- -- 30,000 -- True
│ └─0 [100, 100] ├─10,000
│ └─1 [100, 200] └─20,000
ParameterListModel -- [100, 100] [100, 100] 30,000 -- True
================================================================================================================================================================
Total params: 30,000
Trainable params: 30,000
Expand All @@ -13,6 +10,6 @@ Total mult-adds (M): 0.00
================================================================================================================================================================
Input size (MB): 0.04
Forward/backward pass size (MB): 0.00
Params size (MB): 0.12
Estimated Total Size (MB): 0.16
Params size (MB): 0.00
Estimated Total Size (MB): 0.04
================================================================================================================================================================
Loading