diff --git a/setup.cfg b/setup.cfg index 8994330..2aeed3a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,3 +64,6 @@ profile = black [flake8] max-line-length = 88 extend-ignore = E203,F401 + +[tool:pytest] +python_files = *_test.py diff --git a/tests/conftest.py b/tests/conftest.py index d71724a..ae50f15 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,6 +10,12 @@ from torchinfo.torchinfo import clear_cached_forward_pass +def pytest_configure(config: pytest.Config) -> None: + config.addinivalue_line( + "markers", "no_verify_capsys: skip the verify_capsys fixture" + ) + + def pytest_addoption(parser: pytest.Parser) -> None: """This allows us to check for these params in sys.argv.""" parser.addoption("--overwrite", action="store_true", default=False) @@ -24,6 +30,8 @@ def verify_capsys( clear_cached_forward_pass() if "--no-output" in sys.argv: return + if "no_verify_capsys" in request.keywords: + return test_name = request.node.name.replace("test_", "") if sys.version_info < (3, 8) and test_name == "tmva_net_column_totals": @@ -73,7 +81,7 @@ def get_column_value_for_row(line: str, offset: int) -> int: if ( not col_value or col_value in ("--", "(recursive)") - or col_value.startswith(("└─", "├─")) + or col_value.startswith(("└─", "├─", "'--", "|--")) ): return 0 return int(col_value.replace(",", "").replace("(", "").replace(")", "")) diff --git a/tests/formatting_test.py b/tests/formatting_test.py new file mode 100644 index 0000000..0c3bd61 --- /dev/null +++ b/tests/formatting_test.py @@ -0,0 +1,42 @@ +# pylint: skip-file + +from __future__ import annotations + +import pytest + +from torchinfo.formatting import make_layer_tree + + +class MockLayer: + def __init__(self, depth: int) -> None: + self.depth = depth + + def __repr__(self) -> str: + return f"L({self.depth})" + + +L = MockLayer + + +@pytest.mark.no_verify_capsys +@pytest.mark.parametrize( + "layers, expected", + [ + ([], []), + ([a := L(0)], [a]), + ([a := L(0), b := L(0)], [a, b]), + ([a := L(0), b := L(1)], [a, [b]]), + ([a := L(0), b := L(0), c := L(0)], [a, b, c]), + ([a := L(0), b := L(1), c := L(0)], [a, [b], c]), + ([a := L(0), b := L(1), c := L(1)], [a, [b, c]]), + ([a := L(0), b := L(1), c := L(2)], [a, [b, [c]]]), + ( + # If this ever happens, there's probably a bug elsewhere, but + # we still want to format things as best as possible. + [a := L(1), b := L(0)], + [[a], b], + ), + ], +) +def test_make_layer_tree(layers, expected): # type: ignore [no-untyped-def] + assert make_layer_tree(layers) == expected diff --git a/tests/test_output/ascii_only.out b/tests/test_output/ascii_only.out index a6d86e3..6b819b7 100644 --- a/tests/test_output/ascii_only.out +++ b/tests/test_output/ascii_only.out @@ -2,75 +2,75 @@ Layer (type) Output Shape Param # ========================================================================================== ResNet [1, 1000] -- -+ Conv2d [1, 64, 32, 32] 9,408 -+ BatchNorm2d [1, 64, 32, 32] 128 -+ ReLU [1, 64, 32, 32] -- -+ MaxPool2d [1, 64, 16, 16] -- -+ Sequential [1, 64, 16, 16] -- -| + BasicBlock [1, 64, 16, 16] -- -| | + Conv2d [1, 64, 16, 16] 36,864 -| | + BatchNorm2d [1, 64, 16, 16] 128 -| | + ReLU [1, 64, 16, 16] -- -| | + Conv2d [1, 64, 16, 16] 36,864 -| | + BatchNorm2d [1, 64, 16, 16] 128 -| | + ReLU [1, 64, 16, 16] -- -| + BasicBlock [1, 64, 16, 16] -- -| | + Conv2d [1, 64, 16, 16] 36,864 -| | + BatchNorm2d [1, 64, 16, 16] 128 -| | + ReLU [1, 64, 16, 16] -- -| | + Conv2d [1, 64, 16, 16] 36,864 -| | + BatchNorm2d [1, 64, 16, 16] 128 -| | + ReLU [1, 64, 16, 16] -- -+ Sequential [1, 128, 8, 8] -- -| + BasicBlock [1, 128, 8, 8] -- -| | + Conv2d [1, 128, 8, 8] 73,728 -| | + BatchNorm2d [1, 128, 8, 8] 256 -| | + ReLU [1, 128, 8, 8] -- -| | + Conv2d [1, 128, 8, 8] 147,456 -| | + BatchNorm2d [1, 128, 8, 8] 256 -| | + Sequential [1, 128, 8, 8] 8,448 -| | + ReLU [1, 128, 8, 8] -- -| + BasicBlock [1, 128, 8, 8] -- -| | + Conv2d [1, 128, 8, 8] 147,456 -| | + BatchNorm2d [1, 128, 8, 8] 256 -| | + ReLU [1, 128, 8, 8] -- -| | + Conv2d [1, 128, 8, 8] 147,456 -| | + BatchNorm2d [1, 128, 8, 8] 256 -| | + ReLU [1, 128, 8, 8] -- -+ Sequential [1, 256, 4, 4] -- -| + BasicBlock [1, 256, 4, 4] -- -| | + Conv2d [1, 256, 4, 4] 294,912 -| | + BatchNorm2d [1, 256, 4, 4] 512 -| | + ReLU [1, 256, 4, 4] -- -| | + Conv2d [1, 256, 4, 4] 589,824 -| | + BatchNorm2d [1, 256, 4, 4] 512 -| | + Sequential [1, 256, 4, 4] 33,280 -| | + ReLU [1, 256, 4, 4] -- -| + BasicBlock [1, 256, 4, 4] -- -| | + Conv2d [1, 256, 4, 4] 589,824 -| | + BatchNorm2d [1, 256, 4, 4] 512 -| | + ReLU [1, 256, 4, 4] -- -| | + Conv2d [1, 256, 4, 4] 589,824 -| | + BatchNorm2d [1, 256, 4, 4] 512 -| | + ReLU [1, 256, 4, 4] -- -+ Sequential [1, 512, 2, 2] -- -| + BasicBlock [1, 512, 2, 2] -- -| | + Conv2d [1, 512, 2, 2] 1,179,648 -| | + BatchNorm2d [1, 512, 2, 2] 1,024 -| | + ReLU [1, 512, 2, 2] -- -| | + Conv2d [1, 512, 2, 2] 2,359,296 -| | + BatchNorm2d [1, 512, 2, 2] 1,024 -| | + Sequential [1, 512, 2, 2] 132,096 -| | + ReLU [1, 512, 2, 2] -- -| + BasicBlock [1, 512, 2, 2] -- -| | + Conv2d [1, 512, 2, 2] 2,359,296 -| | + BatchNorm2d [1, 512, 2, 2] 1,024 -| | + ReLU [1, 512, 2, 2] -- -| | + Conv2d [1, 512, 2, 2] 2,359,296 -| | + BatchNorm2d [1, 512, 2, 2] 1,024 -| | + ReLU [1, 512, 2, 2] -- -+ AdaptiveAvgPool2d [1, 512, 1, 1] -- -+ Linear [1, 1000] 513,000 +|--Conv2d [1, 64, 32, 32] 9,408 +|--BatchNorm2d [1, 64, 32, 32] 128 +|--ReLU [1, 64, 32, 32] -- +|--MaxPool2d [1, 64, 16, 16] -- +|--Sequential [1, 64, 16, 16] -- +| |--BasicBlock [1, 64, 16, 16] -- +| | |--Conv2d [1, 64, 16, 16] 36,864 +| | |--BatchNorm2d [1, 64, 16, 16] 128 +| | |--ReLU [1, 64, 16, 16] -- +| | |--Conv2d [1, 64, 16, 16] 36,864 +| | |--BatchNorm2d [1, 64, 16, 16] 128 +| | '--ReLU [1, 64, 16, 16] -- +| '--BasicBlock [1, 64, 16, 16] -- +| |--Conv2d [1, 64, 16, 16] 36,864 +| |--BatchNorm2d [1, 64, 16, 16] 128 +| |--ReLU [1, 64, 16, 16] -- +| |--Conv2d [1, 64, 16, 16] 36,864 +| |--BatchNorm2d [1, 64, 16, 16] 128 +| '--ReLU [1, 64, 16, 16] -- +|--Sequential [1, 128, 8, 8] -- +| |--BasicBlock [1, 128, 8, 8] -- +| | |--Conv2d [1, 128, 8, 8] 73,728 +| | |--BatchNorm2d [1, 128, 8, 8] 256 +| | |--ReLU [1, 128, 8, 8] -- +| | |--Conv2d [1, 128, 8, 8] 147,456 +| | |--BatchNorm2d [1, 128, 8, 8] 256 +| | |--Sequential [1, 128, 8, 8] 8,448 +| | '--ReLU [1, 128, 8, 8] -- +| '--BasicBlock [1, 128, 8, 8] -- +| |--Conv2d [1, 128, 8, 8] 147,456 +| |--BatchNorm2d [1, 128, 8, 8] 256 +| |--ReLU [1, 128, 8, 8] -- +| |--Conv2d [1, 128, 8, 8] 147,456 +| |--BatchNorm2d [1, 128, 8, 8] 256 +| '--ReLU [1, 128, 8, 8] -- +|--Sequential [1, 256, 4, 4] -- +| |--BasicBlock [1, 256, 4, 4] -- +| | |--Conv2d [1, 256, 4, 4] 294,912 +| | |--BatchNorm2d [1, 256, 4, 4] 512 +| | |--ReLU [1, 256, 4, 4] -- +| | |--Conv2d [1, 256, 4, 4] 589,824 +| | |--BatchNorm2d [1, 256, 4, 4] 512 +| | |--Sequential [1, 256, 4, 4] 33,280 +| | '--ReLU [1, 256, 4, 4] -- +| '--BasicBlock [1, 256, 4, 4] -- +| |--Conv2d [1, 256, 4, 4] 589,824 +| |--BatchNorm2d [1, 256, 4, 4] 512 +| |--ReLU [1, 256, 4, 4] -- +| |--Conv2d [1, 256, 4, 4] 589,824 +| |--BatchNorm2d [1, 256, 4, 4] 512 +| '--ReLU [1, 256, 4, 4] -- +|--Sequential [1, 512, 2, 2] -- +| |--BasicBlock [1, 512, 2, 2] -- +| | |--Conv2d [1, 512, 2, 2] 1,179,648 +| | |--BatchNorm2d [1, 512, 2, 2] 1,024 +| | |--ReLU [1, 512, 2, 2] -- +| | |--Conv2d [1, 512, 2, 2] 2,359,296 +| | |--BatchNorm2d [1, 512, 2, 2] 1,024 +| | |--Sequential [1, 512, 2, 2] 132,096 +| | '--ReLU [1, 512, 2, 2] -- +| '--BasicBlock [1, 512, 2, 2] -- +| |--Conv2d [1, 512, 2, 2] 2,359,296 +| |--BatchNorm2d [1, 512, 2, 2] 1,024 +| |--ReLU [1, 512, 2, 2] -- +| |--Conv2d [1, 512, 2, 2] 2,359,296 +| |--BatchNorm2d [1, 512, 2, 2] 1,024 +| '--ReLU [1, 512, 2, 2] -- +|--AdaptiveAvgPool2d [1, 512, 1, 1] -- +'--Linear [1, 1000] 513,000 ========================================================================================== Total params: 11,689,512 Trainable params: 11,689,512 diff --git a/tests/test_output/autoencoder.out b/tests/test_output/autoencoder.out index 66743de..85dba67 100644 --- a/tests/test_output/autoencoder.out +++ b/tests/test_output/autoencoder.out @@ -3,13 +3,13 @@ Layer (type:depth-idx) Output Shape Param # =================================================================================================================== AutoEncoder [1, 3, 64, 64] -- -- ├─Sequential: 1-1 [1, 16, 64, 64] -- -- -│ └─Conv2d: 2-1 [1, 16, 64, 64] 448 [3, 3] +│ ├─Conv2d: 2-1 [1, 16, 64, 64] 448 [3, 3] │ └─ReLU: 2-2 [1, 16, 64, 64] -- -- ├─MaxPool2d: 1-2 [1, 16, 32, 32] -- 2 ├─MaxUnpool2d: 1-3 [1, 16, 64, 64] -- [2, 2] -├─Sequential: 1-4 [1, 3, 64, 64] -- -- -│ └─Conv2d: 2-3 [1, 3, 64, 64] 435 [3, 3] -│ └─ReLU: 2-4 [1, 3, 64, 64] -- -- +└─Sequential: 1-4 [1, 3, 64, 64] -- -- + ├─Conv2d: 2-3 [1, 3, 64, 64] 435 [3, 3] + └─ReLU: 2-4 [1, 3, 64, 64] -- -- =================================================================================================================== Total params: 883 Trainable params: 883 diff --git a/tests/test_output/basic_summary.out b/tests/test_output/basic_summary.out index 03885e9..8e80c74 100644 --- a/tests/test_output/basic_summary.out +++ b/tests/test_output/basic_summary.out @@ -6,7 +6,7 @@ SingleInputNet -- ├─Conv2d: 1-2 5,020 ├─Dropout2d: 1-3 -- ├─Linear: 1-4 16,050 -├─Linear: 1-5 510 +└─Linear: 1-5 510 ================================================================= Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/batch_size_optimization.out b/tests/test_output/batch_size_optimization.out index 8d83982..8dd15ad 100644 --- a/tests/test_output/batch_size_optimization.out +++ b/tests/test_output/batch_size_optimization.out @@ -6,7 +6,7 @@ SingleInputNet [1, 10] -- ├─Conv2d: 1-2 [1, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [1, 20, 8, 8] -- ├─Linear: 1-4 [1, 50] 16,050 -├─Linear: 1-5 [1, 10] 510 +└─Linear: 1-5 [1, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/bert.out b/tests/test_output/bert.out index b27f48e..6d51b4b 100644 --- a/tests/test_output/bert.out +++ b/tests/test_output/bert.out @@ -3,28 +3,28 @@ Layer (type:depth-idx) Output Shape Par ==================================================================================================== BertModel [2, 768] -- ├─BertEmbeddings: 1-1 [2, 512, 768] -- -│ └─Embedding: 2-1 [2, 512, 768] 23,440,896 -│ └─Embedding: 2-2 [2, 512, 768] 1,536 -│ └─Embedding: 2-3 [1, 512, 768] 393,216 -│ └─LayerNorm: 2-4 [2, 512, 768] 1,536 +│ ├─Embedding: 2-1 [2, 512, 768] 23,440,896 +│ ├─Embedding: 2-2 [2, 512, 768] 1,536 +│ ├─Embedding: 2-3 [1, 512, 768] 393,216 +│ ├─LayerNorm: 2-4 [2, 512, 768] 1,536 │ └─Dropout: 2-5 [2, 512, 768] -- ├─BertEncoder: 1-2 [2, 512, 768] -- │ └─ModuleList: 2-6 -- -- -│ │ └─BertLayer: 3-1 [2, 512, 768] 7,087,872 -│ │ └─BertLayer: 3-2 [2, 512, 768] 7,087,872 -│ │ └─BertLayer: 3-3 [2, 512, 768] 7,087,872 -│ │ └─BertLayer: 3-4 [2, 512, 768] 7,087,872 -│ │ └─BertLayer: 3-5 [2, 512, 768] 7,087,872 -│ │ └─BertLayer: 3-6 [2, 512, 768] 7,087,872 -│ │ └─BertLayer: 3-7 [2, 512, 768] 7,087,872 -│ │ └─BertLayer: 3-8 [2, 512, 768] 7,087,872 -│ │ └─BertLayer: 3-9 [2, 512, 768] 7,087,872 -│ │ └─BertLayer: 3-10 [2, 512, 768] 7,087,872 -│ │ └─BertLayer: 3-11 [2, 512, 768] 7,087,872 -│ │ └─BertLayer: 3-12 [2, 512, 768] 7,087,872 -├─BertPooler: 1-3 [2, 768] -- -│ └─Linear: 2-7 [2, 768] 590,592 -│ └─Tanh: 2-8 [2, 768] -- +│ ├─BertLayer: 3-1 [2, 512, 768] 7,087,872 +│ ├─BertLayer: 3-2 [2, 512, 768] 7,087,872 +│ ├─BertLayer: 3-3 [2, 512, 768] 7,087,872 +│ ├─BertLayer: 3-4 [2, 512, 768] 7,087,872 +│ ├─BertLayer: 3-5 [2, 512, 768] 7,087,872 +│ ├─BertLayer: 3-6 [2, 512, 768] 7,087,872 +│ ├─BertLayer: 3-7 [2, 512, 768] 7,087,872 +│ ├─BertLayer: 3-8 [2, 512, 768] 7,087,872 +│ ├─BertLayer: 3-9 [2, 512, 768] 7,087,872 +│ ├─BertLayer: 3-10 [2, 512, 768] 7,087,872 +│ ├─BertLayer: 3-11 [2, 512, 768] 7,087,872 +│ └─BertLayer: 3-12 [2, 512, 768] 7,087,872 +└─BertPooler: 1-3 [2, 768] -- + ├─Linear: 2-7 [2, 768] 590,592 + └─Tanh: 2-8 [2, 768] -- ==================================================================================================== Total params: 109,482,240 Trainable params: 109,482,240 diff --git a/tests/test_output/cnn_module_list.out b/tests/test_output/cnn_module_list.out index 4447728..3869f78 100644 --- a/tests/test_output/cnn_module_list.out +++ b/tests/test_output/cnn_module_list.out @@ -2,27 +2,27 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== CNNModuleList [1, 1, 10] -- -├─ModuleList: 1-1 -- -- -│ └─ConvLayerA: 2-1 [1, 1, 10] -- -│ │ └─Conv1d: 3-1 [1, 1, 10] 2 -│ │ └─ReLU: 3-2 [1, 1, 10] -- -│ │ └─MaxPool1d: 3-3 [1, 1, 10] -- -│ └─ConvLayerA: 2-2 [1, 1, 10] -- -│ │ └─Conv1d: 3-4 [1, 1, 10] 2 -│ │ └─ReLU: 3-5 [1, 1, 10] -- -│ │ └─MaxPool1d: 3-6 [1, 1, 10] -- -│ └─ConvLayerA: 2-3 [1, 1, 10] -- -│ │ └─Conv1d: 3-7 [1, 1, 10] 2 -│ │ └─ReLU: 3-8 [1, 1, 10] -- -│ │ └─MaxPool1d: 3-9 [1, 1, 10] -- -│ └─ConvLayerA: 2-4 [1, 1, 10] -- -│ │ └─Conv1d: 3-10 [1, 1, 10] 2 -│ │ └─ReLU: 3-11 [1, 1, 10] -- -│ │ └─MaxPool1d: 3-12 [1, 1, 10] -- -│ └─ConvLayerA: 2-5 [1, 1, 10] -- -│ │ └─Conv1d: 3-13 [1, 1, 10] 2 -│ │ └─ReLU: 3-14 [1, 1, 10] -- -│ │ └─MaxPool1d: 3-15 [1, 1, 10] -- +└─ModuleList: 1-1 -- -- + ├─ConvLayerA: 2-1 [1, 1, 10] -- + │ ├─Conv1d: 3-1 [1, 1, 10] 2 + │ ├─ReLU: 3-2 [1, 1, 10] -- + │ └─MaxPool1d: 3-3 [1, 1, 10] -- + ├─ConvLayerA: 2-2 [1, 1, 10] -- + │ ├─Conv1d: 3-4 [1, 1, 10] 2 + │ ├─ReLU: 3-5 [1, 1, 10] -- + │ └─MaxPool1d: 3-6 [1, 1, 10] -- + ├─ConvLayerA: 2-3 [1, 1, 10] -- + │ ├─Conv1d: 3-7 [1, 1, 10] 2 + │ ├─ReLU: 3-8 [1, 1, 10] -- + │ └─MaxPool1d: 3-9 [1, 1, 10] -- + ├─ConvLayerA: 2-4 [1, 1, 10] -- + │ ├─Conv1d: 3-10 [1, 1, 10] 2 + │ ├─ReLU: 3-11 [1, 1, 10] -- + │ └─MaxPool1d: 3-12 [1, 1, 10] -- + └─ConvLayerA: 2-5 [1, 1, 10] -- + ├─Conv1d: 3-13 [1, 1, 10] 2 + ├─ReLU: 3-14 [1, 1, 10] -- + └─MaxPool1d: 3-15 [1, 1, 10] -- ========================================================================================== Total params: 10 Trainable params: 10 @@ -38,27 +38,27 @@ Estimated Total Size (MB): 0.00 Layer (type:depth-idx) Output Shape Param # ========================================================================================== CNNModuleList [1, 1, 10] -- -├─ModuleList: 1-1 -- -- -│ └─ConvLayerB: 2-1 [1, 1, 10] -- -│ │ └─Conv1d: 3-1 [1, 1, 10] 2 -│ │ └─ReLU: 3-2 [1, 1, 10] -- -│ │ └─MaxPool1d: 3-3 [1, 1, 10] -- -│ └─ConvLayerB: 2-2 [1, 1, 10] -- -│ │ └─Conv1d: 3-4 [1, 1, 10] 2 -│ │ └─ReLU: 3-5 [1, 1, 10] -- -│ │ └─MaxPool1d: 3-6 [1, 1, 10] -- -│ └─ConvLayerB: 2-3 [1, 1, 10] -- -│ │ └─Conv1d: 3-7 [1, 1, 10] 2 -│ │ └─ReLU: 3-8 [1, 1, 10] -- -│ │ └─MaxPool1d: 3-9 [1, 1, 10] -- -│ └─ConvLayerB: 2-4 [1, 1, 10] -- -│ │ └─Conv1d: 3-10 [1, 1, 10] 2 -│ │ └─ReLU: 3-11 [1, 1, 10] -- -│ │ └─MaxPool1d: 3-12 [1, 1, 10] -- -│ └─ConvLayerB: 2-5 [1, 1, 10] -- -│ │ └─Conv1d: 3-13 [1, 1, 10] 2 -│ │ └─ReLU: 3-14 [1, 1, 10] -- -│ │ └─MaxPool1d: 3-15 [1, 1, 10] -- +└─ModuleList: 1-1 -- -- + ├─ConvLayerB: 2-1 [1, 1, 10] -- + │ ├─Conv1d: 3-1 [1, 1, 10] 2 + │ ├─ReLU: 3-2 [1, 1, 10] -- + │ └─MaxPool1d: 3-3 [1, 1, 10] -- + ├─ConvLayerB: 2-2 [1, 1, 10] -- + │ ├─Conv1d: 3-4 [1, 1, 10] 2 + │ ├─ReLU: 3-5 [1, 1, 10] -- + │ └─MaxPool1d: 3-6 [1, 1, 10] -- + ├─ConvLayerB: 2-3 [1, 1, 10] -- + │ ├─Conv1d: 3-7 [1, 1, 10] 2 + │ ├─ReLU: 3-8 [1, 1, 10] -- + │ └─MaxPool1d: 3-9 [1, 1, 10] -- + ├─ConvLayerB: 2-4 [1, 1, 10] -- + │ ├─Conv1d: 3-10 [1, 1, 10] 2 + │ ├─ReLU: 3-11 [1, 1, 10] -- + │ └─MaxPool1d: 3-12 [1, 1, 10] -- + └─ConvLayerB: 2-5 [1, 1, 10] -- + ├─Conv1d: 3-13 [1, 1, 10] 2 + ├─ReLU: 3-14 [1, 1, 10] -- + └─MaxPool1d: 3-15 [1, 1, 10] -- ========================================================================================== Total params: 10 Trainable params: 10 diff --git a/tests/test_output/compressai.out b/tests/test_output/compressai.out index dd7c360..ee5a112 100644 --- a/tests/test_output/compressai.out +++ b/tests/test_output/compressai.out @@ -3,35 +3,35 @@ Layer (type:depth-idx) Output Shape Param # =============================================================================================== FactorizedPrior [1, 192, 16, 16] -- ├─Sequential: 1-1 [1, 192, 16, 16] -- -│ └─Conv2d: 2-1 [1, 128, 128, 128] 9,728 -│ └─GDN: 2-2 [1, 128, 128, 128] 16,512 -│ │ └─NonNegativeParametrizer: 3-1 [128] -- +│ ├─Conv2d: 2-1 [1, 128, 128, 128] 9,728 +│ ├─GDN: 2-2 [1, 128, 128, 128] 16,512 +│ │ ├─NonNegativeParametrizer: 3-1 [128] -- │ │ └─NonNegativeParametrizer: 3-2 [128, 128] -- -│ └─Conv2d: 2-3 [1, 128, 64, 64] 409,728 -│ └─GDN: 2-4 [1, 128, 64, 64] 16,512 -│ │ └─NonNegativeParametrizer: 3-3 [128] -- +│ ├─Conv2d: 2-3 [1, 128, 64, 64] 409,728 +│ ├─GDN: 2-4 [1, 128, 64, 64] 16,512 +│ │ ├─NonNegativeParametrizer: 3-3 [128] -- │ │ └─NonNegativeParametrizer: 3-4 [128, 128] -- -│ └─Conv2d: 2-5 [1, 128, 32, 32] 409,728 -│ └─GDN: 2-6 [1, 128, 32, 32] 16,512 -│ │ └─NonNegativeParametrizer: 3-5 [128] -- +│ ├─Conv2d: 2-5 [1, 128, 32, 32] 409,728 +│ ├─GDN: 2-6 [1, 128, 32, 32] 16,512 +│ │ ├─NonNegativeParametrizer: 3-5 [128] -- │ │ └─NonNegativeParametrizer: 3-6 [128, 128] -- │ └─Conv2d: 2-7 [1, 192, 16, 16] 614,592 ├─EntropyBottleneck: 1-2 [1, 192, 16, 16] 11,712 │ └─LowerBound: 2-8 [192, 1, 256] -- -├─Sequential: 1-3 [1, 3, 256, 256] -- -│ └─ConvTranspose2d: 2-9 [1, 128, 32, 32] 614,528 -│ └─GDN: 2-10 [1, 128, 32, 32] 16,512 -│ │ └─NonNegativeParametrizer: 3-7 [128] -- -│ │ └─NonNegativeParametrizer: 3-8 [128, 128] -- -│ └─ConvTranspose2d: 2-11 [1, 128, 64, 64] 409,728 -│ └─GDN: 2-12 [1, 128, 64, 64] 16,512 -│ │ └─NonNegativeParametrizer: 3-9 [128] -- -│ │ └─NonNegativeParametrizer: 3-10 [128, 128] -- -│ └─ConvTranspose2d: 2-13 [1, 128, 128, 128] 409,728 -│ └─GDN: 2-14 [1, 128, 128, 128] 16,512 -│ │ └─NonNegativeParametrizer: 3-11 [128] -- -│ │ └─NonNegativeParametrizer: 3-12 [128, 128] -- -│ └─ConvTranspose2d: 2-15 [1, 3, 256, 256] 9,603 +└─Sequential: 1-3 [1, 3, 256, 256] -- + ├─ConvTranspose2d: 2-9 [1, 128, 32, 32] 614,528 + ├─GDN: 2-10 [1, 128, 32, 32] 16,512 + │ ├─NonNegativeParametrizer: 3-7 [128] -- + │ └─NonNegativeParametrizer: 3-8 [128, 128] -- + ├─ConvTranspose2d: 2-11 [1, 128, 64, 64] 409,728 + ├─GDN: 2-12 [1, 128, 64, 64] 16,512 + │ ├─NonNegativeParametrizer: 3-9 [128] -- + │ └─NonNegativeParametrizer: 3-10 [128, 128] -- + ├─ConvTranspose2d: 2-13 [1, 128, 128, 128] 409,728 + ├─GDN: 2-14 [1, 128, 128, 128] 16,512 + │ ├─NonNegativeParametrizer: 3-11 [128] -- + │ └─NonNegativeParametrizer: 3-12 [128, 128] -- + └─ConvTranspose2d: 2-15 [1, 3, 256, 256] 9,603 =============================================================================================== Total params: 2,998,147 Trainable params: 2,998,147 diff --git a/tests/test_output/container.out b/tests/test_output/container.out index 299a300..2059d2a 100644 --- a/tests/test_output/container.out +++ b/tests/test_output/container.out @@ -2,22 +2,22 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== ContainerModule [1, 5] -- -├─ModuleList: 1-1 -- -- -│ └─Linear: 2-1 [1, 5] 30 -│ └─ContainerChildModule: 2-2 [1, 5] -- -│ │ └─Sequential: 3-1 [1, 5] -- -│ │ │ └─Linear: 4-1 [1, 5] 30 -│ │ │ └─Linear: 4-2 [1, 5] 30 -│ │ └─Linear: 3-2 [1, 5] 30 -│ │ └─Sequential: 3-3 -- (recursive) -│ │ │ └─Linear: 4-3 [1, 5] (recursive) -│ │ │ └─Linear: 4-4 [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) -│ │ │ └─Linear: 4-8 [1, 5] (recursive) -│ └─Linear: 2-3 [1, 5] 30 +└─ModuleList: 1-1 -- -- + ├─Linear: 2-1 [1, 5] 30 + ├─ContainerChildModule: 2-2 [1, 5] -- + │ ├─Sequential: 3-1 [1, 5] -- + │ │ ├─Linear: 4-1 [1, 5] 30 + │ │ └─Linear: 4-2 [1, 5] 30 + │ ├─Linear: 3-2 [1, 5] 30 + │ ├─Sequential: 3-3 -- (recursive) + │ │ ├─Linear: 4-3 [1, 5] (recursive) + │ │ └─Linear: 4-4 [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) + │ └─Linear: 4-8 [1, 5] (recursive) + └─Linear: 2-3 [1, 5] 30 ========================================================================================== Total params: 150 Trainable params: 150 @@ -33,14 +33,14 @@ Estimated Total Size (MB): 0.00 Layer (type:depth-idx) Output Shape Param # ========================================================================================== ContainerModule [5] -- -├─ModuleList: 1-1 -- -- -│ └─Linear: 2-1 [5] 30 -│ └─ContainerChildModule: 2-2 [5] -- -│ │ └─Sequential: 3-1 [5] 60 -│ │ └─Linear: 3-2 [5] 30 -│ │ └─Sequential: 3-3 -- (recursive) -│ │ └─Sequential: 3-4 [5] (recursive) -│ └─Linear: 2-3 [5] 30 +└─ModuleList: 1-1 -- -- + ├─Linear: 2-1 [5] 30 + ├─ContainerChildModule: 2-2 [5] -- + │ ├─Sequential: 3-1 [5] 60 + │ ├─Linear: 3-2 [5] 30 + │ ├─Sequential: 3-3 -- (recursive) + │ └─Sequential: 3-4 [5] (recursive) + └─Linear: 2-3 [5] 30 ========================================================================================== Total params: 150 Trainable params: 150 diff --git a/tests/test_output/device.out b/tests/test_output/device.out index b1f5141..9850ebb 100644 --- a/tests/test_output/device.out +++ b/tests/test_output/device.out @@ -6,7 +6,7 @@ SingleInputNet [5, 10] -- ├─Conv2d: 1-2 [5, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [5, 20, 8, 8] -- ├─Linear: 1-4 [5, 50] 16,050 -├─Linear: 1-5 [5, 10] 510 +└─Linear: 1-5 [5, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 @@ -26,7 +26,7 @@ SingleInputNet [5, 10] -- ├─Conv2d: 1-2 [5, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [5, 20, 8, 8] -- ├─Linear: 1-4 [5, 50] 16,050 -├─Linear: 1-5 [5, 10] 510 +└─Linear: 1-5 [5, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 @@ -46,7 +46,7 @@ SingleInputNet [5, 10] -- ├─Conv2d: 1-2 [5, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [5, 20, 8, 8] -- ├─Linear: 1-4 [5, 50] 16,050 -├─Linear: 1-5 [5, 10] 510 +└─Linear: 1-5 [5, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 @@ -66,7 +66,7 @@ SingleInputNet [5, 10] -- ├─Conv2d: 1-2 [5, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [5, 20, 8, 8] -- ├─Linear: 1-4 [5, 50] 16,050 -├─Linear: 1-5 [5, 10] 510 +└─Linear: 1-5 [5, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 @@ -86,7 +86,7 @@ SingleInputNet [5, 10] -- ├─Conv2d: 1-2 [5, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [5, 20, 8, 8] -- ├─Linear: 1-4 [5, 50] 16,050 -├─Linear: 1-5 [5, 10] 510 +└─Linear: 1-5 [5, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/device_parallelism.out b/tests/test_output/device_parallelism.out index 3c914df..1c20169 100644 --- a/tests/test_output/device_parallelism.out +++ b/tests/test_output/device_parallelism.out @@ -4,7 +4,7 @@ Layer (type:depth-idx) Output Shape Param # MultiDeviceModel [5] -- ├─Linear: 1-1 [10] 110 ├─ReLU: 1-2 [10] -- -├─Linear: 1-3 [5] 55 +└─Linear: 1-3 [5] 55 ========================================================================================== Total params: 165 Trainable params: 165 diff --git a/tests/test_output/dict_input.out b/tests/test_output/dict_input.out index 431ad0c..3904f85 100644 --- a/tests/test_output/dict_input.out +++ b/tests/test_output/dict_input.out @@ -5,7 +5,7 @@ MultipleInputNetDifferentDtypes [2, 10] -- ├─Linear: 1-1 [1, 50] 15,050 ├─Linear: 1-2 [1, 10] 510 ├─Linear: 1-3 [1, 50] 15,050 -├─Linear: 1-4 [1, 10] 510 +└─Linear: 1-4 [1, 10] 510 ========================================================================================== Total params: 31,120 Trainable params: 31,120 diff --git a/tests/test_output/edgecase_input_output_model.out b/tests/test_output/edgecase_input_output_model.out index 3159a36..c85a751 100644 --- a/tests/test_output/edgecase_input_output_model.out +++ b/tests/test_output/edgecase_input_output_model.out @@ -2,7 +2,7 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== EdgecaseInputOutputModel -- -- -├─Linear: 1-1 [1] 4 +└─Linear: 1-1 [1] 4 ========================================================================================== Total params: 4 Trainable params: 4 diff --git a/tests/test_output/eval_order_doesnt_matter.out b/tests/test_output/eval_order_doesnt_matter.out index 54dfe79..ecd96f7 100644 --- a/tests/test_output/eval_order_doesnt_matter.out +++ b/tests/test_output/eval_order_doesnt_matter.out @@ -7,70 +7,70 @@ ResNet [1, 1000] -- ├─ReLU: 1-3 [1, 64, 112, 112] -- ├─MaxPool2d: 1-4 [1, 64, 56, 56] -- ├─Sequential: 1-5 [1, 64, 56, 56] -- -│ └─BasicBlock: 2-1 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-1 [1, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-2 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-3 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-4 [1, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-5 [1, 64, 56, 56] 128 +│ ├─BasicBlock: 2-1 [1, 64, 56, 56] -- +│ │ ├─Conv2d: 3-1 [1, 64, 56, 56] 36,864 +│ │ ├─BatchNorm2d: 3-2 [1, 64, 56, 56] 128 +│ │ ├─ReLU: 3-3 [1, 64, 56, 56] -- +│ │ ├─Conv2d: 3-4 [1, 64, 56, 56] 36,864 +│ │ ├─BatchNorm2d: 3-5 [1, 64, 56, 56] 128 │ │ └─ReLU: 3-6 [1, 64, 56, 56] -- │ └─BasicBlock: 2-2 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-7 [1, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-8 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-9 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-10 [1, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-11 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-12 [1, 64, 56, 56] -- +│ ├─Conv2d: 3-7 [1, 64, 56, 56] 36,864 +│ ├─BatchNorm2d: 3-8 [1, 64, 56, 56] 128 +│ ├─ReLU: 3-9 [1, 64, 56, 56] -- +│ ├─Conv2d: 3-10 [1, 64, 56, 56] 36,864 +│ ├─BatchNorm2d: 3-11 [1, 64, 56, 56] 128 +│ └─ReLU: 3-12 [1, 64, 56, 56] -- ├─Sequential: 1-6 [1, 128, 28, 28] -- -│ └─BasicBlock: 2-3 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-13 [1, 128, 28, 28] 73,728 -│ │ └─BatchNorm2d: 3-14 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-15 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-16 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-17 [1, 128, 28, 28] 256 -│ │ └─Sequential: 3-18 [1, 128, 28, 28] 8,448 +│ ├─BasicBlock: 2-3 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-13 [1, 128, 28, 28] 73,728 +│ │ ├─BatchNorm2d: 3-14 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-15 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-16 [1, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-17 [1, 128, 28, 28] 256 +│ │ ├─Sequential: 3-18 [1, 128, 28, 28] 8,448 │ │ └─ReLU: 3-19 [1, 128, 28, 28] -- │ └─BasicBlock: 2-4 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-20 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-21 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-22 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-23 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-24 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-25 [1, 128, 28, 28] -- +│ ├─Conv2d: 3-20 [1, 128, 28, 28] 147,456 +│ ├─BatchNorm2d: 3-21 [1, 128, 28, 28] 256 +│ ├─ReLU: 3-22 [1, 128, 28, 28] -- +│ ├─Conv2d: 3-23 [1, 128, 28, 28] 147,456 +│ ├─BatchNorm2d: 3-24 [1, 128, 28, 28] 256 +│ └─ReLU: 3-25 [1, 128, 28, 28] -- ├─Sequential: 1-7 [1, 256, 14, 14] -- -│ └─BasicBlock: 2-5 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-26 [1, 256, 14, 14] 294,912 -│ │ └─BatchNorm2d: 3-27 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-28 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-29 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-30 [1, 256, 14, 14] 512 -│ │ └─Sequential: 3-31 [1, 256, 14, 14] 33,280 +│ ├─BasicBlock: 2-5 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-26 [1, 256, 14, 14] 294,912 +│ │ ├─BatchNorm2d: 3-27 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-28 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-29 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-30 [1, 256, 14, 14] 512 +│ │ ├─Sequential: 3-31 [1, 256, 14, 14] 33,280 │ │ └─ReLU: 3-32 [1, 256, 14, 14] -- │ └─BasicBlock: 2-6 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-33 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-34 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-35 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-36 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-37 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-38 [1, 256, 14, 14] -- +│ ├─Conv2d: 3-33 [1, 256, 14, 14] 589,824 +│ ├─BatchNorm2d: 3-34 [1, 256, 14, 14] 512 +│ ├─ReLU: 3-35 [1, 256, 14, 14] -- +│ ├─Conv2d: 3-36 [1, 256, 14, 14] 589,824 +│ ├─BatchNorm2d: 3-37 [1, 256, 14, 14] 512 +│ └─ReLU: 3-38 [1, 256, 14, 14] -- ├─Sequential: 1-8 [1, 512, 7, 7] -- -│ └─BasicBlock: 2-7 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-39 [1, 512, 7, 7] 1,179,648 -│ │ └─BatchNorm2d: 3-40 [1, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-41 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-42 [1, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-43 [1, 512, 7, 7] 1,024 -│ │ └─Sequential: 3-44 [1, 512, 7, 7] 132,096 +│ ├─BasicBlock: 2-7 [1, 512, 7, 7] -- +│ │ ├─Conv2d: 3-39 [1, 512, 7, 7] 1,179,648 +│ │ ├─BatchNorm2d: 3-40 [1, 512, 7, 7] 1,024 +│ │ ├─ReLU: 3-41 [1, 512, 7, 7] -- +│ │ ├─Conv2d: 3-42 [1, 512, 7, 7] 2,359,296 +│ │ ├─BatchNorm2d: 3-43 [1, 512, 7, 7] 1,024 +│ │ ├─Sequential: 3-44 [1, 512, 7, 7] 132,096 │ │ └─ReLU: 3-45 [1, 512, 7, 7] -- │ └─BasicBlock: 2-8 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-46 [1, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-47 [1, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-48 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-49 [1, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-50 [1, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-51 [1, 512, 7, 7] -- +│ ├─Conv2d: 3-46 [1, 512, 7, 7] 2,359,296 +│ ├─BatchNorm2d: 3-47 [1, 512, 7, 7] 1,024 +│ ├─ReLU: 3-48 [1, 512, 7, 7] -- +│ ├─Conv2d: 3-49 [1, 512, 7, 7] 2,359,296 +│ ├─BatchNorm2d: 3-50 [1, 512, 7, 7] 1,024 +│ └─ReLU: 3-51 [1, 512, 7, 7] -- ├─AdaptiveAvgPool2d: 1-9 [1, 512, 1, 1] -- -├─Linear: 1-10 [1, 1000] 513,000 +└─Linear: 1-10 [1, 1000] 513,000 ========================================================================================== Total params: 11,689,512 Trainable params: 11,689,512 @@ -91,70 +91,70 @@ ResNet [1, 1000] -- ├─ReLU: 1-3 [1, 64, 112, 112] -- ├─MaxPool2d: 1-4 [1, 64, 56, 56] -- ├─Sequential: 1-5 [1, 64, 56, 56] -- -│ └─BasicBlock: 2-1 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-1 [1, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-2 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-3 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-4 [1, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-5 [1, 64, 56, 56] 128 +│ ├─BasicBlock: 2-1 [1, 64, 56, 56] -- +│ │ ├─Conv2d: 3-1 [1, 64, 56, 56] 36,864 +│ │ ├─BatchNorm2d: 3-2 [1, 64, 56, 56] 128 +│ │ ├─ReLU: 3-3 [1, 64, 56, 56] -- +│ │ ├─Conv2d: 3-4 [1, 64, 56, 56] 36,864 +│ │ ├─BatchNorm2d: 3-5 [1, 64, 56, 56] 128 │ │ └─ReLU: 3-6 [1, 64, 56, 56] -- │ └─BasicBlock: 2-2 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-7 [1, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-8 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-9 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-10 [1, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-11 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-12 [1, 64, 56, 56] -- +│ ├─Conv2d: 3-7 [1, 64, 56, 56] 36,864 +│ ├─BatchNorm2d: 3-8 [1, 64, 56, 56] 128 +│ ├─ReLU: 3-9 [1, 64, 56, 56] -- +│ ├─Conv2d: 3-10 [1, 64, 56, 56] 36,864 +│ ├─BatchNorm2d: 3-11 [1, 64, 56, 56] 128 +│ └─ReLU: 3-12 [1, 64, 56, 56] -- ├─Sequential: 1-6 [1, 128, 28, 28] -- -│ └─BasicBlock: 2-3 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-13 [1, 128, 28, 28] 73,728 -│ │ └─BatchNorm2d: 3-14 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-15 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-16 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-17 [1, 128, 28, 28] 256 -│ │ └─Sequential: 3-18 [1, 128, 28, 28] 8,448 +│ ├─BasicBlock: 2-3 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-13 [1, 128, 28, 28] 73,728 +│ │ ├─BatchNorm2d: 3-14 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-15 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-16 [1, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-17 [1, 128, 28, 28] 256 +│ │ ├─Sequential: 3-18 [1, 128, 28, 28] 8,448 │ │ └─ReLU: 3-19 [1, 128, 28, 28] -- │ └─BasicBlock: 2-4 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-20 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-21 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-22 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-23 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-24 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-25 [1, 128, 28, 28] -- +│ ├─Conv2d: 3-20 [1, 128, 28, 28] 147,456 +│ ├─BatchNorm2d: 3-21 [1, 128, 28, 28] 256 +│ ├─ReLU: 3-22 [1, 128, 28, 28] -- +│ ├─Conv2d: 3-23 [1, 128, 28, 28] 147,456 +│ ├─BatchNorm2d: 3-24 [1, 128, 28, 28] 256 +│ └─ReLU: 3-25 [1, 128, 28, 28] -- ├─Sequential: 1-7 [1, 256, 14, 14] -- -│ └─BasicBlock: 2-5 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-26 [1, 256, 14, 14] 294,912 -│ │ └─BatchNorm2d: 3-27 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-28 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-29 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-30 [1, 256, 14, 14] 512 -│ │ └─Sequential: 3-31 [1, 256, 14, 14] 33,280 +│ ├─BasicBlock: 2-5 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-26 [1, 256, 14, 14] 294,912 +│ │ ├─BatchNorm2d: 3-27 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-28 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-29 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-30 [1, 256, 14, 14] 512 +│ │ ├─Sequential: 3-31 [1, 256, 14, 14] 33,280 │ │ └─ReLU: 3-32 [1, 256, 14, 14] -- │ └─BasicBlock: 2-6 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-33 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-34 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-35 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-36 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-37 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-38 [1, 256, 14, 14] -- +│ ├─Conv2d: 3-33 [1, 256, 14, 14] 589,824 +│ ├─BatchNorm2d: 3-34 [1, 256, 14, 14] 512 +│ ├─ReLU: 3-35 [1, 256, 14, 14] -- +│ ├─Conv2d: 3-36 [1, 256, 14, 14] 589,824 +│ ├─BatchNorm2d: 3-37 [1, 256, 14, 14] 512 +│ └─ReLU: 3-38 [1, 256, 14, 14] -- ├─Sequential: 1-8 [1, 512, 7, 7] -- -│ └─BasicBlock: 2-7 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-39 [1, 512, 7, 7] 1,179,648 -│ │ └─BatchNorm2d: 3-40 [1, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-41 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-42 [1, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-43 [1, 512, 7, 7] 1,024 -│ │ └─Sequential: 3-44 [1, 512, 7, 7] 132,096 +│ ├─BasicBlock: 2-7 [1, 512, 7, 7] -- +│ │ ├─Conv2d: 3-39 [1, 512, 7, 7] 1,179,648 +│ │ ├─BatchNorm2d: 3-40 [1, 512, 7, 7] 1,024 +│ │ ├─ReLU: 3-41 [1, 512, 7, 7] -- +│ │ ├─Conv2d: 3-42 [1, 512, 7, 7] 2,359,296 +│ │ ├─BatchNorm2d: 3-43 [1, 512, 7, 7] 1,024 +│ │ ├─Sequential: 3-44 [1, 512, 7, 7] 132,096 │ │ └─ReLU: 3-45 [1, 512, 7, 7] -- │ └─BasicBlock: 2-8 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-46 [1, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-47 [1, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-48 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-49 [1, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-50 [1, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-51 [1, 512, 7, 7] -- +│ ├─Conv2d: 3-46 [1, 512, 7, 7] 2,359,296 +│ ├─BatchNorm2d: 3-47 [1, 512, 7, 7] 1,024 +│ ├─ReLU: 3-48 [1, 512, 7, 7] -- +│ ├─Conv2d: 3-49 [1, 512, 7, 7] 2,359,296 +│ ├─BatchNorm2d: 3-50 [1, 512, 7, 7] 1,024 +│ └─ReLU: 3-51 [1, 512, 7, 7] -- ├─AdaptiveAvgPool2d: 1-9 [1, 512, 1, 1] -- -├─Linear: 1-10 [1, 1000] 513,000 +└─Linear: 1-10 [1, 1000] 513,000 ========================================================================================== Total params: 11,689,512 Trainable params: 11,689,512 diff --git a/tests/test_output/fasterrcnn.out b/tests/test_output/fasterrcnn.out index e04803f..933f752 100644 --- a/tests/test_output/fasterrcnn.out +++ b/tests/test_output/fasterrcnn.out @@ -4,47 +4,47 @@ Layer (type:depth-idx) Output Shape FasterRCNN -- -- ├─BackboneWithFPN: 1 -- -- │ └─FeaturePyramidNetwork: 2 -- -- -│ │ └─ModuleList: 3-1 -- 984,064 -│ │ └─ModuleList: 3-2 -- 2,360,320 +│ ├─ModuleList: 3-1 -- 984,064 +│ └─ModuleList: 3-2 -- 2,360,320 ├─GeneralizedRCNNTransform: 1-1 -- -- ├─BackboneWithFPN: 1-2 [1, 256, 13, 13] -- -│ └─IntermediateLayerGetter: 2-1 [1, 2048, 25, 25] -- -│ │ └─Conv2d: 3-3 [1, 64, 400, 400] 9,408 -│ │ └─FrozenBatchNorm2d: 3-4 [1, 64, 400, 400] -- -│ │ └─ReLU: 3-5 [1, 64, 400, 400] -- -│ │ └─MaxPool2d: 3-6 [1, 64, 200, 200] -- -│ │ └─Sequential: 3-7 [1, 256, 200, 200] 212,992 -│ │ └─Sequential: 3-8 [1, 512, 100, 100] 1,212,416 -│ │ └─Sequential: 3-9 [1, 1024, 50, 50] 7,077,888 +│ ├─IntermediateLayerGetter: 2-1 [1, 2048, 25, 25] -- +│ │ ├─Conv2d: 3-3 [1, 64, 400, 400] 9,408 +│ │ ├─FrozenBatchNorm2d: 3-4 [1, 64, 400, 400] -- +│ │ ├─ReLU: 3-5 [1, 64, 400, 400] -- +│ │ ├─MaxPool2d: 3-6 [1, 64, 200, 200] -- +│ │ ├─Sequential: 3-7 [1, 256, 200, 200] 212,992 +│ │ ├─Sequential: 3-8 [1, 512, 100, 100] 1,212,416 +│ │ ├─Sequential: 3-9 [1, 1024, 50, 50] 7,077,888 │ │ └─Sequential: 3-10 [1, 2048, 25, 25] 14,942,208 │ └─FeaturePyramidNetwork: 2-2 [1, 256, 13, 13] -- -│ │ └─LastLevelMaxPool: 3-11 [1, 256, 200, 200] -- +│ └─LastLevelMaxPool: 3-11 [1, 256, 200, 200] -- ├─RegionProposalNetwork: 1-3 [1000, 4] -- -│ └─RPNHead: 2-3 [1, 3, 200, 200] -- -│ │ └─Conv2d: 3-12 [1, 256, 200, 200] 590,080 -│ │ └─Conv2d: 3-13 [1, 3, 200, 200] 771 -│ │ └─Conv2d: 3-14 [1, 12, 200, 200] 3,084 -│ │ └─Conv2d: 3-15 [1, 256, 100, 100] (recursive) -│ │ └─Conv2d: 3-16 [1, 3, 100, 100] (recursive) -│ │ └─Conv2d: 3-17 [1, 12, 100, 100] (recursive) -│ │ └─Conv2d: 3-18 [1, 256, 50, 50] (recursive) -│ │ └─Conv2d: 3-19 [1, 3, 50, 50] (recursive) -│ │ └─Conv2d: 3-20 [1, 12, 50, 50] (recursive) -│ │ └─Conv2d: 3-21 [1, 256, 25, 25] (recursive) -│ │ └─Conv2d: 3-22 [1, 3, 25, 25] (recursive) -│ │ └─Conv2d: 3-23 [1, 12, 25, 25] (recursive) -│ │ └─Conv2d: 3-24 [1, 256, 13, 13] (recursive) -│ │ └─Conv2d: 3-25 [1, 3, 13, 13] (recursive) +│ ├─RPNHead: 2-3 [1, 3, 200, 200] -- +│ │ ├─Conv2d: 3-12 [1, 256, 200, 200] 590,080 +│ │ ├─Conv2d: 3-13 [1, 3, 200, 200] 771 +│ │ ├─Conv2d: 3-14 [1, 12, 200, 200] 3,084 +│ │ ├─Conv2d: 3-15 [1, 256, 100, 100] (recursive) +│ │ ├─Conv2d: 3-16 [1, 3, 100, 100] (recursive) +│ │ ├─Conv2d: 3-17 [1, 12, 100, 100] (recursive) +│ │ ├─Conv2d: 3-18 [1, 256, 50, 50] (recursive) +│ │ ├─Conv2d: 3-19 [1, 3, 50, 50] (recursive) +│ │ ├─Conv2d: 3-20 [1, 12, 50, 50] (recursive) +│ │ ├─Conv2d: 3-21 [1, 256, 25, 25] (recursive) +│ │ ├─Conv2d: 3-22 [1, 3, 25, 25] (recursive) +│ │ ├─Conv2d: 3-23 [1, 12, 25, 25] (recursive) +│ │ ├─Conv2d: 3-24 [1, 256, 13, 13] (recursive) +│ │ ├─Conv2d: 3-25 [1, 3, 13, 13] (recursive) │ │ └─Conv2d: 3-26 [1, 12, 13, 13] (recursive) │ └─AnchorGenerator: 2-4 [159882, 4] -- -├─RoIHeads: 1-4 -- -- -│ └─MultiScaleRoIAlign: 2-5 [1000, 256, 7, 7] -- -│ └─TwoMLPHead: 2-6 [1000, 1024] -- -│ │ └─Linear: 3-27 [1000, 1024] 12,846,080 -│ │ └─Linear: 3-28 [1000, 1024] 1,049,600 -│ └─FastRCNNPredictor: 2-7 [1000, 91] -- -│ │ └─Linear: 3-29 [1000, 91] 93,275 -│ │ └─Linear: 3-30 [1000, 364] 373,100 +└─RoIHeads: 1-4 -- -- + ├─MultiScaleRoIAlign: 2-5 [1000, 256, 7, 7] -- + ├─TwoMLPHead: 2-6 [1000, 1024] -- + │ ├─Linear: 3-27 [1000, 1024] 12,846,080 + │ └─Linear: 3-28 [1000, 1024] 1,049,600 + └─FastRCNNPredictor: 2-7 [1000, 91] -- + ├─Linear: 3-29 [1000, 91] 93,275 + └─Linear: 3-30 [1000, 364] 373,100 ========================================================================================================= Total params: 41,755,286 Trainable params: 41,755,286 diff --git a/tests/test_output/flan_t5_small.out b/tests/test_output/flan_t5_small.out index a23caac..a93afa6 100644 --- a/tests/test_output/flan_t5_small.out +++ b/tests/test_output/flan_t5_small.out @@ -6,33 +6,33 @@ T5ForConditionalGeneration [3, 100, 512] ├─T5Stack: 1-2 -- (recursive) │ └─Embedding: 2-1 [3, 100, 512] 16,449,536 ├─T5Stack: 1-3 -- (recursive) -│ └─Dropout: 2-2 [3, 100, 512] -- -│ └─ModuleList: 2-3 -- -- -│ │ └─T5Block: 3-1 [3, 100, 512] 2,360,512 -│ │ └─T5Block: 3-2 [3, 100, 512] 2,360,320 -│ │ └─T5Block: 3-3 [3, 100, 512] 2,360,320 -│ │ └─T5Block: 3-4 [3, 100, 512] 2,360,320 -│ │ └─T5Block: 3-5 [3, 100, 512] 2,360,320 -│ │ └─T5Block: 3-6 [3, 100, 512] 2,360,320 -│ │ └─T5Block: 3-7 [3, 100, 512] 2,360,320 +│ ├─Dropout: 2-2 [3, 100, 512] -- +│ ├─ModuleList: 2-3 -- -- +│ │ ├─T5Block: 3-1 [3, 100, 512] 2,360,512 +│ │ ├─T5Block: 3-2 [3, 100, 512] 2,360,320 +│ │ ├─T5Block: 3-3 [3, 100, 512] 2,360,320 +│ │ ├─T5Block: 3-4 [3, 100, 512] 2,360,320 +│ │ ├─T5Block: 3-5 [3, 100, 512] 2,360,320 +│ │ ├─T5Block: 3-6 [3, 100, 512] 2,360,320 +│ │ ├─T5Block: 3-7 [3, 100, 512] 2,360,320 │ │ └─T5Block: 3-8 [3, 100, 512] 2,360,320 -│ └─T5LayerNorm: 2-4 [3, 100, 512] 512 +│ ├─T5LayerNorm: 2-4 [3, 100, 512] 512 │ └─Dropout: 2-5 [3, 100, 512] -- ├─T5Stack: 1-4 [3, 6, 100, 64] 16,449,536 -│ └─Embedding: 2-6 [3, 100, 512] (recursive) -│ └─Dropout: 2-7 [3, 100, 512] -- -│ └─ModuleList: 2-8 -- -- -│ │ └─T5Block: 3-9 [3, 100, 512] 3,147,456 -│ │ └─T5Block: 3-10 [3, 100, 512] 3,147,264 -│ │ └─T5Block: 3-11 [3, 100, 512] 3,147,264 -│ │ └─T5Block: 3-12 [3, 100, 512] 3,147,264 -│ │ └─T5Block: 3-13 [3, 100, 512] 3,147,264 -│ │ └─T5Block: 3-14 [3, 100, 512] 3,147,264 -│ │ └─T5Block: 3-15 [3, 100, 512] 3,147,264 +│ ├─Embedding: 2-6 [3, 100, 512] (recursive) +│ ├─Dropout: 2-7 [3, 100, 512] -- +│ ├─ModuleList: 2-8 -- -- +│ │ ├─T5Block: 3-9 [3, 100, 512] 3,147,456 +│ │ ├─T5Block: 3-10 [3, 100, 512] 3,147,264 +│ │ ├─T5Block: 3-11 [3, 100, 512] 3,147,264 +│ │ ├─T5Block: 3-12 [3, 100, 512] 3,147,264 +│ │ ├─T5Block: 3-13 [3, 100, 512] 3,147,264 +│ │ ├─T5Block: 3-14 [3, 100, 512] 3,147,264 +│ │ ├─T5Block: 3-15 [3, 100, 512] 3,147,264 │ │ └─T5Block: 3-16 [3, 100, 512] 3,147,264 -│ └─T5LayerNorm: 2-9 [3, 100, 512] 512 +│ ├─T5LayerNorm: 2-9 [3, 100, 512] 512 │ └─Dropout: 2-10 [3, 100, 512] -- -├─Linear: 1-5 [3, 100, 32128] 16,449,536 +└─Linear: 1-5 [3, 100, 32128] 16,449,536 ============================================================================================================== Total params: 128,743,488 Trainable params: 128,743,488 diff --git a/tests/test_output/formatting_options.out b/tests/test_output/formatting_options.out index 91179c0..1e9ff49 100644 --- a/tests/test_output/formatting_options.out +++ b/tests/test_output/formatting_options.out @@ -6,7 +6,7 @@ SingleInputNet [16, 10] -- ├─Conv2d: 1-2 [16, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [16, 20, 8, 8] -- ├─Linear: 1-4 [16, 50] 16,050 -├─Linear: 1-5 [16, 10] 510 +└─Linear: 1-5 [16, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 @@ -26,7 +26,7 @@ SingleInputNet [16, 10] -- ├─Conv2d: 1-2 [16, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [16, 20, 8, 8] -- ├─Linear: 1-4 [16, 50] 16,050 -├─Linear: 1-5 [16, 10] 510 +└─Linear: 1-5 [16, 10] 510 ========================================================================================== Total params (T): 0.00 Trainable params (T): 0.00 diff --git a/tests/test_output/forward_pass_exception.out b/tests/test_output/forward_pass_exception.out index 0a4e007..9ecb302 100644 --- a/tests/test_output/forward_pass_exception.out +++ b/tests/test_output/forward_pass_exception.out @@ -3,8 +3,8 @@ Layer (type:depth-idx) Output Shape ============================================================================================================== EdgeCaseModel [1, 10, 24, 24] -- ├─Conv2d: 1-1 [1, 10, 24, 24] 260 -├─LayerWithRidiculouslyLongNameAndDoesntDoAnything: 1-2 [1, 10, 24, 24] -- -│ └─Identity: 2-1 [1, 10, 24, 24] -- +└─LayerWithRidiculouslyLongNameAndDoesntDoAnything: 1-2 [1, 10, 24, 24] -- + └─Identity: 2-1 [1, 10, 24, 24] -- ============================================================================================================== Total params: 260 Trainable params: 260 diff --git a/tests/test_output/frozen_layers.out b/tests/test_output/frozen_layers.out index f42fdbb..0e43bac 100644 --- a/tests/test_output/frozen_layers.out +++ b/tests/test_output/frozen_layers.out @@ -7,70 +7,70 @@ ResNet [1, 1000] -- ├─ReLU: 1-3 [1, 64, 32, 32] -- -- -- ├─MaxPool2d: 1-4 [1, 64, 16, 16] -- 3 -- ├─Sequential: 1-5 [1, 64, 16, 16] -- -- -- -│ └─BasicBlock: 2-1 [1, 64, 16, 16] -- -- -- -│ │ └─Conv2d: 3-1 [1, 64, 16, 16] (36,864) [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-2 [1, 64, 16, 16] (128) -- 128 -│ │ └─ReLU: 3-3 [1, 64, 16, 16] -- -- -- -│ │ └─Conv2d: 3-4 [1, 64, 16, 16] (36,864) [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-5 [1, 64, 16, 16] (128) -- 128 +│ ├─BasicBlock: 2-1 [1, 64, 16, 16] -- -- -- +│ │ ├─Conv2d: 3-1 [1, 64, 16, 16] (36,864) [3, 3] 9,437,184 +│ │ ├─BatchNorm2d: 3-2 [1, 64, 16, 16] (128) -- 128 +│ │ ├─ReLU: 3-3 [1, 64, 16, 16] -- -- -- +│ │ ├─Conv2d: 3-4 [1, 64, 16, 16] (36,864) [3, 3] 9,437,184 +│ │ ├─BatchNorm2d: 3-5 [1, 64, 16, 16] (128) -- 128 │ │ └─ReLU: 3-6 [1, 64, 16, 16] -- -- -- │ └─BasicBlock: 2-2 [1, 64, 16, 16] -- -- -- -│ │ └─Conv2d: 3-7 [1, 64, 16, 16] (36,864) [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-8 [1, 64, 16, 16] (128) -- 128 -│ │ └─ReLU: 3-9 [1, 64, 16, 16] -- -- -- -│ │ └─Conv2d: 3-10 [1, 64, 16, 16] (36,864) [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-11 [1, 64, 16, 16] (128) -- 128 -│ │ └─ReLU: 3-12 [1, 64, 16, 16] -- -- -- +│ ├─Conv2d: 3-7 [1, 64, 16, 16] (36,864) [3, 3] 9,437,184 +│ ├─BatchNorm2d: 3-8 [1, 64, 16, 16] (128) -- 128 +│ ├─ReLU: 3-9 [1, 64, 16, 16] -- -- -- +│ ├─Conv2d: 3-10 [1, 64, 16, 16] (36,864) [3, 3] 9,437,184 +│ ├─BatchNorm2d: 3-11 [1, 64, 16, 16] (128) -- 128 +│ └─ReLU: 3-12 [1, 64, 16, 16] -- -- -- ├─Sequential: 1-6 [1, 128, 8, 8] -- -- -- -│ └─BasicBlock: 2-3 [1, 128, 8, 8] -- -- -- -│ │ └─Conv2d: 3-13 [1, 128, 8, 8] (73,728) [3, 3] 4,718,592 -│ │ └─BatchNorm2d: 3-14 [1, 128, 8, 8] (256) -- 256 -│ │ └─ReLU: 3-15 [1, 128, 8, 8] -- -- -- -│ │ └─Conv2d: 3-16 [1, 128, 8, 8] (147,456) [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-17 [1, 128, 8, 8] (256) -- 256 -│ │ └─Sequential: 3-18 [1, 128, 8, 8] (8,448) -- 524,544 +│ ├─BasicBlock: 2-3 [1, 128, 8, 8] -- -- -- +│ │ ├─Conv2d: 3-13 [1, 128, 8, 8] (73,728) [3, 3] 4,718,592 +│ │ ├─BatchNorm2d: 3-14 [1, 128, 8, 8] (256) -- 256 +│ │ ├─ReLU: 3-15 [1, 128, 8, 8] -- -- -- +│ │ ├─Conv2d: 3-16 [1, 128, 8, 8] (147,456) [3, 3] 9,437,184 +│ │ ├─BatchNorm2d: 3-17 [1, 128, 8, 8] (256) -- 256 +│ │ ├─Sequential: 3-18 [1, 128, 8, 8] (8,448) -- 524,544 │ │ └─ReLU: 3-19 [1, 128, 8, 8] -- -- -- │ └─BasicBlock: 2-4 [1, 128, 8, 8] -- -- -- -│ │ └─Conv2d: 3-20 [1, 128, 8, 8] (147,456) [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-21 [1, 128, 8, 8] (256) -- 256 -│ │ └─ReLU: 3-22 [1, 128, 8, 8] -- -- -- -│ │ └─Conv2d: 3-23 [1, 128, 8, 8] (147,456) [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-24 [1, 128, 8, 8] (256) -- 256 -│ │ └─ReLU: 3-25 [1, 128, 8, 8] -- -- -- +│ ├─Conv2d: 3-20 [1, 128, 8, 8] (147,456) [3, 3] 9,437,184 +│ ├─BatchNorm2d: 3-21 [1, 128, 8, 8] (256) -- 256 +│ ├─ReLU: 3-22 [1, 128, 8, 8] -- -- -- +│ ├─Conv2d: 3-23 [1, 128, 8, 8] (147,456) [3, 3] 9,437,184 +│ ├─BatchNorm2d: 3-24 [1, 128, 8, 8] (256) -- 256 +│ └─ReLU: 3-25 [1, 128, 8, 8] -- -- -- ├─Sequential: 1-7 [1, 256, 4, 4] -- -- -- -│ └─BasicBlock: 2-5 [1, 256, 4, 4] -- -- -- -│ │ └─Conv2d: 3-26 [1, 256, 4, 4] 294,912 [3, 3] 4,718,592 -│ │ └─BatchNorm2d: 3-27 [1, 256, 4, 4] 512 -- 512 -│ │ └─ReLU: 3-28 [1, 256, 4, 4] -- -- -- -│ │ └─Conv2d: 3-29 [1, 256, 4, 4] 589,824 [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-30 [1, 256, 4, 4] 512 -- 512 -│ │ └─Sequential: 3-31 [1, 256, 4, 4] 33,280 -- 524,800 +│ ├─BasicBlock: 2-5 [1, 256, 4, 4] -- -- -- +│ │ ├─Conv2d: 3-26 [1, 256, 4, 4] 294,912 [3, 3] 4,718,592 +│ │ ├─BatchNorm2d: 3-27 [1, 256, 4, 4] 512 -- 512 +│ │ ├─ReLU: 3-28 [1, 256, 4, 4] -- -- -- +│ │ ├─Conv2d: 3-29 [1, 256, 4, 4] 589,824 [3, 3] 9,437,184 +│ │ ├─BatchNorm2d: 3-30 [1, 256, 4, 4] 512 -- 512 +│ │ ├─Sequential: 3-31 [1, 256, 4, 4] 33,280 -- 524,800 │ │ └─ReLU: 3-32 [1, 256, 4, 4] -- -- -- │ └─BasicBlock: 2-6 [1, 256, 4, 4] -- -- -- -│ │ └─Conv2d: 3-33 [1, 256, 4, 4] 589,824 [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-34 [1, 256, 4, 4] 512 -- 512 -│ │ └─ReLU: 3-35 [1, 256, 4, 4] -- -- -- -│ │ └─Conv2d: 3-36 [1, 256, 4, 4] 589,824 [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-37 [1, 256, 4, 4] 512 -- 512 -│ │ └─ReLU: 3-38 [1, 256, 4, 4] -- -- -- +│ ├─Conv2d: 3-33 [1, 256, 4, 4] 589,824 [3, 3] 9,437,184 +│ ├─BatchNorm2d: 3-34 [1, 256, 4, 4] 512 -- 512 +│ ├─ReLU: 3-35 [1, 256, 4, 4] -- -- -- +│ ├─Conv2d: 3-36 [1, 256, 4, 4] 589,824 [3, 3] 9,437,184 +│ ├─BatchNorm2d: 3-37 [1, 256, 4, 4] 512 -- 512 +│ └─ReLU: 3-38 [1, 256, 4, 4] -- -- -- ├─Sequential: 1-8 [1, 512, 2, 2] -- -- -- -│ └─BasicBlock: 2-7 [1, 512, 2, 2] -- -- -- -│ │ └─Conv2d: 3-39 [1, 512, 2, 2] 1,179,648 [3, 3] 4,718,592 -│ │ └─BatchNorm2d: 3-40 [1, 512, 2, 2] 1,024 -- 1,024 -│ │ └─ReLU: 3-41 [1, 512, 2, 2] -- -- -- -│ │ └─Conv2d: 3-42 [1, 512, 2, 2] 2,359,296 [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-43 [1, 512, 2, 2] 1,024 -- 1,024 -│ │ └─Sequential: 3-44 [1, 512, 2, 2] 132,096 -- 525,312 +│ ├─BasicBlock: 2-7 [1, 512, 2, 2] -- -- -- +│ │ ├─Conv2d: 3-39 [1, 512, 2, 2] 1,179,648 [3, 3] 4,718,592 +│ │ ├─BatchNorm2d: 3-40 [1, 512, 2, 2] 1,024 -- 1,024 +│ │ ├─ReLU: 3-41 [1, 512, 2, 2] -- -- -- +│ │ ├─Conv2d: 3-42 [1, 512, 2, 2] 2,359,296 [3, 3] 9,437,184 +│ │ ├─BatchNorm2d: 3-43 [1, 512, 2, 2] 1,024 -- 1,024 +│ │ ├─Sequential: 3-44 [1, 512, 2, 2] 132,096 -- 525,312 │ │ └─ReLU: 3-45 [1, 512, 2, 2] -- -- -- │ └─BasicBlock: 2-8 [1, 512, 2, 2] -- -- -- -│ │ └─Conv2d: 3-46 [1, 512, 2, 2] 2,359,296 [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-47 [1, 512, 2, 2] 1,024 -- 1,024 -│ │ └─ReLU: 3-48 [1, 512, 2, 2] -- -- -- -│ │ └─Conv2d: 3-49 [1, 512, 2, 2] 2,359,296 [3, 3] 9,437,184 -│ │ └─BatchNorm2d: 3-50 [1, 512, 2, 2] 1,024 -- 1,024 -│ │ └─ReLU: 3-51 [1, 512, 2, 2] -- -- -- +│ ├─Conv2d: 3-46 [1, 512, 2, 2] 2,359,296 [3, 3] 9,437,184 +│ ├─BatchNorm2d: 3-47 [1, 512, 2, 2] 1,024 -- 1,024 +│ ├─ReLU: 3-48 [1, 512, 2, 2] -- -- -- +│ ├─Conv2d: 3-49 [1, 512, 2, 2] 2,359,296 [3, 3] 9,437,184 +│ ├─BatchNorm2d: 3-50 [1, 512, 2, 2] 1,024 -- 1,024 +│ └─ReLU: 3-51 [1, 512, 2, 2] -- -- -- ├─AdaptiveAvgPool2d: 1-9 [1, 512, 1, 1] -- -- -- -├─Linear: 1-10 [1, 1000] 513,000 -- 513,000 +└─Linear: 1-10 [1, 1000] 513,000 -- 513,000 ============================================================================================================================================ Total params: 11,689,512 Trainable params: 11,006,440 diff --git a/tests/test_output/genotype.out b/tests/test_output/genotype.out index 3ba7636..7cecf25 100644 --- a/tests/test_output/genotype.out +++ b/tests/test_output/genotype.out @@ -3,13 +3,13 @@ Layer (type:depth-idx) Output Shape Param # =============================================================================================== GenotypeNetwork -- -- ├─Sequential: 1-1 [2, 48, 32, 32] -- -│ └─Conv2d: 2-1 [2, 48, 32, 32] 1,296 +│ ├─Conv2d: 2-1 [2, 48, 32, 32] 1,296 │ └─BatchNorm2d: 2-2 [2, 48, 32, 32] 96 -├─ModuleList: 1-2 -- -- -│ └─Cell: 2-3 [2, 32, 32, 32] -- -│ │ └─ReLUConvBN: 3-1 [2, 32, 32, 32] 1,600 -│ │ └─ReLUConvBN: 3-2 [2, 32, 32, 32] 1,600 -│ │ └─ModuleList: 3-3 -- -- +└─ModuleList: 1-2 -- -- + └─Cell: 2-3 [2, 32, 32, 32] -- + ├─ReLUConvBN: 3-1 [2, 32, 32, 32] 1,600 + ├─ReLUConvBN: 3-2 [2, 32, 32, 32] 1,600 + └─ModuleList: 3-3 -- -- =============================================================================================== Total params: 4,592 Trainable params: 4,592 @@ -26,25 +26,25 @@ Layer (type:depth-idx) Output Shape Param # =============================================================================================== GenotypeNetwork -- -- ├─Sequential: 1-1 [2, 48, 32, 32] -- -│ └─Conv2d: 2-1 [2, 48, 32, 32] 1,296 +│ ├─Conv2d: 2-1 [2, 48, 32, 32] 1,296 │ └─BatchNorm2d: 2-2 [2, 48, 32, 32] 96 -├─ModuleList: 1-2 -- -- -│ └─Cell: 2-3 [2, 32, 32, 32] -- -│ │ └─ReLUConvBN: 3-1 [2, 32, 32, 32] -- -│ │ │ └─Sequential: 4-1 [2, 32, 32, 32] -- -│ │ │ │ └─ReLU: 5-1 [2, 48, 32, 32] -- -│ │ │ │ └─Conv2d: 5-2 [2, 32, 32, 32] 1,536 -│ │ │ │ └─BatchNorm2d: 5-3 [2, 32, 32, 32] 64 -│ │ └─ReLUConvBN: 3-2 [2, 32, 32, 32] -- -│ │ │ └─Sequential: 4-2 [2, 32, 32, 32] -- -│ │ │ │ └─ReLU: 5-4 [2, 48, 32, 32] -- -│ │ │ │ └─Conv2d: 5-5 [2, 32, 32, 32] 1,536 -│ │ │ │ └─BatchNorm2d: 5-6 [2, 32, 32, 32] 64 -│ │ └─ModuleList: 3-3 -- -- -│ │ │ └─IdentityModel: 4-3 [2, 32, 32, 32] -- -│ │ │ │ └─Identity: 5-7 [2, 32, 32, 32] -- -│ │ │ └─IdentityModel: 4-4 [2, 32, 32, 32] -- -│ │ │ │ └─Identity: 5-8 [2, 32, 32, 32] -- +└─ModuleList: 1-2 -- -- + └─Cell: 2-3 [2, 32, 32, 32] -- + ├─ReLUConvBN: 3-1 [2, 32, 32, 32] -- + │ └─Sequential: 4-1 [2, 32, 32, 32] -- + │ ├─ReLU: 5-1 [2, 48, 32, 32] -- + │ ├─Conv2d: 5-2 [2, 32, 32, 32] 1,536 + │ └─BatchNorm2d: 5-3 [2, 32, 32, 32] 64 + ├─ReLUConvBN: 3-2 [2, 32, 32, 32] -- + │ └─Sequential: 4-2 [2, 32, 32, 32] -- + │ ├─ReLU: 5-4 [2, 48, 32, 32] -- + │ ├─Conv2d: 5-5 [2, 32, 32, 32] 1,536 + │ └─BatchNorm2d: 5-6 [2, 32, 32, 32] 64 + └─ModuleList: 3-3 -- -- + ├─IdentityModel: 4-3 [2, 32, 32, 32] -- + │ └─Identity: 5-7 [2, 32, 32, 32] -- + └─IdentityModel: 4-4 [2, 32, 32, 32] -- + └─Identity: 5-8 [2, 32, 32, 32] -- =============================================================================================== Total params: 4,592 Trainable params: 4,592 diff --git a/tests/test_output/google.out b/tests/test_output/google.out index f1cbe3b..19972e3 100644 --- a/tests/test_output/google.out +++ b/tests/test_output/google.out @@ -3,228 +3,228 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== GoogLeNet [1, 1000] 6,379,984 ├─BasicConv2d: 1-1 [1, 64, 56, 56] -- -│ └─Conv2d: 2-1 [1, 64, 56, 56] 9,408 +│ ├─Conv2d: 2-1 [1, 64, 56, 56] 9,408 │ └─BatchNorm2d: 2-2 [1, 64, 56, 56] 128 ├─MaxPool2d: 1-2 [1, 64, 28, 28] -- ├─BasicConv2d: 1-3 [1, 64, 28, 28] -- -│ └─Conv2d: 2-3 [1, 64, 28, 28] 4,096 +│ ├─Conv2d: 2-3 [1, 64, 28, 28] 4,096 │ └─BatchNorm2d: 2-4 [1, 64, 28, 28] 128 ├─BasicConv2d: 1-4 [1, 192, 28, 28] -- -│ └─Conv2d: 2-5 [1, 192, 28, 28] 110,592 +│ ├─Conv2d: 2-5 [1, 192, 28, 28] 110,592 │ └─BatchNorm2d: 2-6 [1, 192, 28, 28] 384 ├─MaxPool2d: 1-5 [1, 192, 14, 14] -- ├─Inception: 1-6 [1, 256, 14, 14] -- -│ └─BasicConv2d: 2-7 [1, 64, 14, 14] -- -│ │ └─Conv2d: 3-1 [1, 64, 14, 14] 12,288 +│ ├─BasicConv2d: 2-7 [1, 64, 14, 14] -- +│ │ ├─Conv2d: 3-1 [1, 64, 14, 14] 12,288 │ │ └─BatchNorm2d: 3-2 [1, 64, 14, 14] 128 -│ └─Sequential: 2-8 [1, 128, 14, 14] -- -│ │ └─BasicConv2d: 3-3 [1, 96, 14, 14] -- -│ │ │ └─Conv2d: 4-1 [1, 96, 14, 14] 18,432 +│ ├─Sequential: 2-8 [1, 128, 14, 14] -- +│ │ ├─BasicConv2d: 3-3 [1, 96, 14, 14] -- +│ │ │ ├─Conv2d: 4-1 [1, 96, 14, 14] 18,432 │ │ │ └─BatchNorm2d: 4-2 [1, 96, 14, 14] 192 │ │ └─BasicConv2d: 3-4 [1, 128, 14, 14] -- -│ │ │ └─Conv2d: 4-3 [1, 128, 14, 14] 110,592 -│ │ │ └─BatchNorm2d: 4-4 [1, 128, 14, 14] 256 -│ └─Sequential: 2-9 [1, 32, 14, 14] -- -│ │ └─BasicConv2d: 3-5 [1, 16, 14, 14] -- -│ │ │ └─Conv2d: 4-5 [1, 16, 14, 14] 3,072 +│ │ ├─Conv2d: 4-3 [1, 128, 14, 14] 110,592 +│ │ └─BatchNorm2d: 4-4 [1, 128, 14, 14] 256 +│ ├─Sequential: 2-9 [1, 32, 14, 14] -- +│ │ ├─BasicConv2d: 3-5 [1, 16, 14, 14] -- +│ │ │ ├─Conv2d: 4-5 [1, 16, 14, 14] 3,072 │ │ │ └─BatchNorm2d: 4-6 [1, 16, 14, 14] 32 │ │ └─BasicConv2d: 3-6 [1, 32, 14, 14] -- -│ │ │ └─Conv2d: 4-7 [1, 32, 14, 14] 4,608 -│ │ │ └─BatchNorm2d: 4-8 [1, 32, 14, 14] 64 +│ │ ├─Conv2d: 4-7 [1, 32, 14, 14] 4,608 +│ │ └─BatchNorm2d: 4-8 [1, 32, 14, 14] 64 │ └─Sequential: 2-10 [1, 32, 14, 14] -- -│ │ └─MaxPool2d: 3-7 [1, 192, 14, 14] -- -│ │ └─BasicConv2d: 3-8 [1, 32, 14, 14] -- -│ │ │ └─Conv2d: 4-9 [1, 32, 14, 14] 6,144 -│ │ │ └─BatchNorm2d: 4-10 [1, 32, 14, 14] 64 +│ ├─MaxPool2d: 3-7 [1, 192, 14, 14] -- +│ └─BasicConv2d: 3-8 [1, 32, 14, 14] -- +│ ├─Conv2d: 4-9 [1, 32, 14, 14] 6,144 +│ └─BatchNorm2d: 4-10 [1, 32, 14, 14] 64 ├─Inception: 1-7 [1, 480, 14, 14] -- -│ └─BasicConv2d: 2-11 [1, 128, 14, 14] -- -│ │ └─Conv2d: 3-9 [1, 128, 14, 14] 32,768 +│ ├─BasicConv2d: 2-11 [1, 128, 14, 14] -- +│ │ ├─Conv2d: 3-9 [1, 128, 14, 14] 32,768 │ │ └─BatchNorm2d: 3-10 [1, 128, 14, 14] 256 -│ └─Sequential: 2-12 [1, 192, 14, 14] -- -│ │ └─BasicConv2d: 3-11 [1, 128, 14, 14] -- -│ │ │ └─Conv2d: 4-11 [1, 128, 14, 14] 32,768 +│ ├─Sequential: 2-12 [1, 192, 14, 14] -- +│ │ ├─BasicConv2d: 3-11 [1, 128, 14, 14] -- +│ │ │ ├─Conv2d: 4-11 [1, 128, 14, 14] 32,768 │ │ │ └─BatchNorm2d: 4-12 [1, 128, 14, 14] 256 │ │ └─BasicConv2d: 3-12 [1, 192, 14, 14] -- -│ │ │ └─Conv2d: 4-13 [1, 192, 14, 14] 221,184 -│ │ │ └─BatchNorm2d: 4-14 [1, 192, 14, 14] 384 -│ └─Sequential: 2-13 [1, 96, 14, 14] -- -│ │ └─BasicConv2d: 3-13 [1, 32, 14, 14] -- -│ │ │ └─Conv2d: 4-15 [1, 32, 14, 14] 8,192 +│ │ ├─Conv2d: 4-13 [1, 192, 14, 14] 221,184 +│ │ └─BatchNorm2d: 4-14 [1, 192, 14, 14] 384 +│ ├─Sequential: 2-13 [1, 96, 14, 14] -- +│ │ ├─BasicConv2d: 3-13 [1, 32, 14, 14] -- +│ │ │ ├─Conv2d: 4-15 [1, 32, 14, 14] 8,192 │ │ │ └─BatchNorm2d: 4-16 [1, 32, 14, 14] 64 │ │ └─BasicConv2d: 3-14 [1, 96, 14, 14] -- -│ │ │ └─Conv2d: 4-17 [1, 96, 14, 14] 27,648 -│ │ │ └─BatchNorm2d: 4-18 [1, 96, 14, 14] 192 +│ │ ├─Conv2d: 4-17 [1, 96, 14, 14] 27,648 +│ │ └─BatchNorm2d: 4-18 [1, 96, 14, 14] 192 │ └─Sequential: 2-14 [1, 64, 14, 14] -- -│ │ └─MaxPool2d: 3-15 [1, 256, 14, 14] -- -│ │ └─BasicConv2d: 3-16 [1, 64, 14, 14] -- -│ │ │ └─Conv2d: 4-19 [1, 64, 14, 14] 16,384 -│ │ │ └─BatchNorm2d: 4-20 [1, 64, 14, 14] 128 +│ ├─MaxPool2d: 3-15 [1, 256, 14, 14] -- +│ └─BasicConv2d: 3-16 [1, 64, 14, 14] -- +│ ├─Conv2d: 4-19 [1, 64, 14, 14] 16,384 +│ └─BatchNorm2d: 4-20 [1, 64, 14, 14] 128 ├─MaxPool2d: 1-8 [1, 480, 7, 7] -- ├─Inception: 1-9 [1, 512, 7, 7] -- -│ └─BasicConv2d: 2-15 [1, 192, 7, 7] -- -│ │ └─Conv2d: 3-17 [1, 192, 7, 7] 92,160 +│ ├─BasicConv2d: 2-15 [1, 192, 7, 7] -- +│ │ ├─Conv2d: 3-17 [1, 192, 7, 7] 92,160 │ │ └─BatchNorm2d: 3-18 [1, 192, 7, 7] 384 -│ └─Sequential: 2-16 [1, 208, 7, 7] -- -│ │ └─BasicConv2d: 3-19 [1, 96, 7, 7] -- -│ │ │ └─Conv2d: 4-21 [1, 96, 7, 7] 46,080 +│ ├─Sequential: 2-16 [1, 208, 7, 7] -- +│ │ ├─BasicConv2d: 3-19 [1, 96, 7, 7] -- +│ │ │ ├─Conv2d: 4-21 [1, 96, 7, 7] 46,080 │ │ │ └─BatchNorm2d: 4-22 [1, 96, 7, 7] 192 │ │ └─BasicConv2d: 3-20 [1, 208, 7, 7] -- -│ │ │ └─Conv2d: 4-23 [1, 208, 7, 7] 179,712 -│ │ │ └─BatchNorm2d: 4-24 [1, 208, 7, 7] 416 -│ └─Sequential: 2-17 [1, 48, 7, 7] -- -│ │ └─BasicConv2d: 3-21 [1, 16, 7, 7] -- -│ │ │ └─Conv2d: 4-25 [1, 16, 7, 7] 7,680 +│ │ ├─Conv2d: 4-23 [1, 208, 7, 7] 179,712 +│ │ └─BatchNorm2d: 4-24 [1, 208, 7, 7] 416 +│ ├─Sequential: 2-17 [1, 48, 7, 7] -- +│ │ ├─BasicConv2d: 3-21 [1, 16, 7, 7] -- +│ │ │ ├─Conv2d: 4-25 [1, 16, 7, 7] 7,680 │ │ │ └─BatchNorm2d: 4-26 [1, 16, 7, 7] 32 │ │ └─BasicConv2d: 3-22 [1, 48, 7, 7] -- -│ │ │ └─Conv2d: 4-27 [1, 48, 7, 7] 6,912 -│ │ │ └─BatchNorm2d: 4-28 [1, 48, 7, 7] 96 +│ │ ├─Conv2d: 4-27 [1, 48, 7, 7] 6,912 +│ │ └─BatchNorm2d: 4-28 [1, 48, 7, 7] 96 │ └─Sequential: 2-18 [1, 64, 7, 7] -- -│ │ └─MaxPool2d: 3-23 [1, 480, 7, 7] -- -│ │ └─BasicConv2d: 3-24 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-29 [1, 64, 7, 7] 30,720 -│ │ │ └─BatchNorm2d: 4-30 [1, 64, 7, 7] 128 +│ ├─MaxPool2d: 3-23 [1, 480, 7, 7] -- +│ └─BasicConv2d: 3-24 [1, 64, 7, 7] -- +│ ├─Conv2d: 4-29 [1, 64, 7, 7] 30,720 +│ └─BatchNorm2d: 4-30 [1, 64, 7, 7] 128 ├─Inception: 1-10 [1, 512, 7, 7] -- -│ └─BasicConv2d: 2-19 [1, 160, 7, 7] -- -│ │ └─Conv2d: 3-25 [1, 160, 7, 7] 81,920 +│ ├─BasicConv2d: 2-19 [1, 160, 7, 7] -- +│ │ ├─Conv2d: 3-25 [1, 160, 7, 7] 81,920 │ │ └─BatchNorm2d: 3-26 [1, 160, 7, 7] 320 -│ └─Sequential: 2-20 [1, 224, 7, 7] -- -│ │ └─BasicConv2d: 3-27 [1, 112, 7, 7] -- -│ │ │ └─Conv2d: 4-31 [1, 112, 7, 7] 57,344 +│ ├─Sequential: 2-20 [1, 224, 7, 7] -- +│ │ ├─BasicConv2d: 3-27 [1, 112, 7, 7] -- +│ │ │ ├─Conv2d: 4-31 [1, 112, 7, 7] 57,344 │ │ │ └─BatchNorm2d: 4-32 [1, 112, 7, 7] 224 │ │ └─BasicConv2d: 3-28 [1, 224, 7, 7] -- -│ │ │ └─Conv2d: 4-33 [1, 224, 7, 7] 225,792 -│ │ │ └─BatchNorm2d: 4-34 [1, 224, 7, 7] 448 -│ └─Sequential: 2-21 [1, 64, 7, 7] -- -│ │ └─BasicConv2d: 3-29 [1, 24, 7, 7] -- -│ │ │ └─Conv2d: 4-35 [1, 24, 7, 7] 12,288 +│ │ ├─Conv2d: 4-33 [1, 224, 7, 7] 225,792 +│ │ └─BatchNorm2d: 4-34 [1, 224, 7, 7] 448 +│ ├─Sequential: 2-21 [1, 64, 7, 7] -- +│ │ ├─BasicConv2d: 3-29 [1, 24, 7, 7] -- +│ │ │ ├─Conv2d: 4-35 [1, 24, 7, 7] 12,288 │ │ │ └─BatchNorm2d: 4-36 [1, 24, 7, 7] 48 │ │ └─BasicConv2d: 3-30 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-37 [1, 64, 7, 7] 13,824 -│ │ │ └─BatchNorm2d: 4-38 [1, 64, 7, 7] 128 +│ │ ├─Conv2d: 4-37 [1, 64, 7, 7] 13,824 +│ │ └─BatchNorm2d: 4-38 [1, 64, 7, 7] 128 │ └─Sequential: 2-22 [1, 64, 7, 7] -- -│ │ └─MaxPool2d: 3-31 [1, 512, 7, 7] -- -│ │ └─BasicConv2d: 3-32 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-39 [1, 64, 7, 7] 32,768 -│ │ │ └─BatchNorm2d: 4-40 [1, 64, 7, 7] 128 +│ ├─MaxPool2d: 3-31 [1, 512, 7, 7] -- +│ └─BasicConv2d: 3-32 [1, 64, 7, 7] -- +│ ├─Conv2d: 4-39 [1, 64, 7, 7] 32,768 +│ └─BatchNorm2d: 4-40 [1, 64, 7, 7] 128 ├─Inception: 1-11 [1, 512, 7, 7] -- -│ └─BasicConv2d: 2-23 [1, 128, 7, 7] -- -│ │ └─Conv2d: 3-33 [1, 128, 7, 7] 65,536 +│ ├─BasicConv2d: 2-23 [1, 128, 7, 7] -- +│ │ ├─Conv2d: 3-33 [1, 128, 7, 7] 65,536 │ │ └─BatchNorm2d: 3-34 [1, 128, 7, 7] 256 -│ └─Sequential: 2-24 [1, 256, 7, 7] -- -│ │ └─BasicConv2d: 3-35 [1, 128, 7, 7] -- -│ │ │ └─Conv2d: 4-41 [1, 128, 7, 7] 65,536 +│ ├─Sequential: 2-24 [1, 256, 7, 7] -- +│ │ ├─BasicConv2d: 3-35 [1, 128, 7, 7] -- +│ │ │ ├─Conv2d: 4-41 [1, 128, 7, 7] 65,536 │ │ │ └─BatchNorm2d: 4-42 [1, 128, 7, 7] 256 │ │ └─BasicConv2d: 3-36 [1, 256, 7, 7] -- -│ │ │ └─Conv2d: 4-43 [1, 256, 7, 7] 294,912 -│ │ │ └─BatchNorm2d: 4-44 [1, 256, 7, 7] 512 -│ └─Sequential: 2-25 [1, 64, 7, 7] -- -│ │ └─BasicConv2d: 3-37 [1, 24, 7, 7] -- -│ │ │ └─Conv2d: 4-45 [1, 24, 7, 7] 12,288 +│ │ ├─Conv2d: 4-43 [1, 256, 7, 7] 294,912 +│ │ └─BatchNorm2d: 4-44 [1, 256, 7, 7] 512 +│ ├─Sequential: 2-25 [1, 64, 7, 7] -- +│ │ ├─BasicConv2d: 3-37 [1, 24, 7, 7] -- +│ │ │ ├─Conv2d: 4-45 [1, 24, 7, 7] 12,288 │ │ │ └─BatchNorm2d: 4-46 [1, 24, 7, 7] 48 │ │ └─BasicConv2d: 3-38 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-47 [1, 64, 7, 7] 13,824 -│ │ │ └─BatchNorm2d: 4-48 [1, 64, 7, 7] 128 +│ │ ├─Conv2d: 4-47 [1, 64, 7, 7] 13,824 +│ │ └─BatchNorm2d: 4-48 [1, 64, 7, 7] 128 │ └─Sequential: 2-26 [1, 64, 7, 7] -- -│ │ └─MaxPool2d: 3-39 [1, 512, 7, 7] -- -│ │ └─BasicConv2d: 3-40 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-49 [1, 64, 7, 7] 32,768 -│ │ │ └─BatchNorm2d: 4-50 [1, 64, 7, 7] 128 +│ ├─MaxPool2d: 3-39 [1, 512, 7, 7] -- +│ └─BasicConv2d: 3-40 [1, 64, 7, 7] -- +│ ├─Conv2d: 4-49 [1, 64, 7, 7] 32,768 +│ └─BatchNorm2d: 4-50 [1, 64, 7, 7] 128 ├─Inception: 1-12 [1, 528, 7, 7] -- -│ └─BasicConv2d: 2-27 [1, 112, 7, 7] -- -│ │ └─Conv2d: 3-41 [1, 112, 7, 7] 57,344 +│ ├─BasicConv2d: 2-27 [1, 112, 7, 7] -- +│ │ ├─Conv2d: 3-41 [1, 112, 7, 7] 57,344 │ │ └─BatchNorm2d: 3-42 [1, 112, 7, 7] 224 -│ └─Sequential: 2-28 [1, 288, 7, 7] -- -│ │ └─BasicConv2d: 3-43 [1, 144, 7, 7] -- -│ │ │ └─Conv2d: 4-51 [1, 144, 7, 7] 73,728 +│ ├─Sequential: 2-28 [1, 288, 7, 7] -- +│ │ ├─BasicConv2d: 3-43 [1, 144, 7, 7] -- +│ │ │ ├─Conv2d: 4-51 [1, 144, 7, 7] 73,728 │ │ │ └─BatchNorm2d: 4-52 [1, 144, 7, 7] 288 │ │ └─BasicConv2d: 3-44 [1, 288, 7, 7] -- -│ │ │ └─Conv2d: 4-53 [1, 288, 7, 7] 373,248 -│ │ │ └─BatchNorm2d: 4-54 [1, 288, 7, 7] 576 -│ └─Sequential: 2-29 [1, 64, 7, 7] -- -│ │ └─BasicConv2d: 3-45 [1, 32, 7, 7] -- -│ │ │ └─Conv2d: 4-55 [1, 32, 7, 7] 16,384 +│ │ ├─Conv2d: 4-53 [1, 288, 7, 7] 373,248 +│ │ └─BatchNorm2d: 4-54 [1, 288, 7, 7] 576 +│ ├─Sequential: 2-29 [1, 64, 7, 7] -- +│ │ ├─BasicConv2d: 3-45 [1, 32, 7, 7] -- +│ │ │ ├─Conv2d: 4-55 [1, 32, 7, 7] 16,384 │ │ │ └─BatchNorm2d: 4-56 [1, 32, 7, 7] 64 │ │ └─BasicConv2d: 3-46 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-57 [1, 64, 7, 7] 18,432 -│ │ │ └─BatchNorm2d: 4-58 [1, 64, 7, 7] 128 +│ │ ├─Conv2d: 4-57 [1, 64, 7, 7] 18,432 +│ │ └─BatchNorm2d: 4-58 [1, 64, 7, 7] 128 │ └─Sequential: 2-30 [1, 64, 7, 7] -- -│ │ └─MaxPool2d: 3-47 [1, 512, 7, 7] -- -│ │ └─BasicConv2d: 3-48 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-59 [1, 64, 7, 7] 32,768 -│ │ │ └─BatchNorm2d: 4-60 [1, 64, 7, 7] 128 +│ ├─MaxPool2d: 3-47 [1, 512, 7, 7] -- +│ └─BasicConv2d: 3-48 [1, 64, 7, 7] -- +│ ├─Conv2d: 4-59 [1, 64, 7, 7] 32,768 +│ └─BatchNorm2d: 4-60 [1, 64, 7, 7] 128 ├─Inception: 1-13 [1, 832, 7, 7] -- -│ └─BasicConv2d: 2-31 [1, 256, 7, 7] -- -│ │ └─Conv2d: 3-49 [1, 256, 7, 7] 135,168 +│ ├─BasicConv2d: 2-31 [1, 256, 7, 7] -- +│ │ ├─Conv2d: 3-49 [1, 256, 7, 7] 135,168 │ │ └─BatchNorm2d: 3-50 [1, 256, 7, 7] 512 -│ └─Sequential: 2-32 [1, 320, 7, 7] -- -│ │ └─BasicConv2d: 3-51 [1, 160, 7, 7] -- -│ │ │ └─Conv2d: 4-61 [1, 160, 7, 7] 84,480 +│ ├─Sequential: 2-32 [1, 320, 7, 7] -- +│ │ ├─BasicConv2d: 3-51 [1, 160, 7, 7] -- +│ │ │ ├─Conv2d: 4-61 [1, 160, 7, 7] 84,480 │ │ │ └─BatchNorm2d: 4-62 [1, 160, 7, 7] 320 │ │ └─BasicConv2d: 3-52 [1, 320, 7, 7] -- -│ │ │ └─Conv2d: 4-63 [1, 320, 7, 7] 460,800 -│ │ │ └─BatchNorm2d: 4-64 [1, 320, 7, 7] 640 -│ └─Sequential: 2-33 [1, 128, 7, 7] -- -│ │ └─BasicConv2d: 3-53 [1, 32, 7, 7] -- -│ │ │ └─Conv2d: 4-65 [1, 32, 7, 7] 16,896 +│ │ ├─Conv2d: 4-63 [1, 320, 7, 7] 460,800 +│ │ └─BatchNorm2d: 4-64 [1, 320, 7, 7] 640 +│ ├─Sequential: 2-33 [1, 128, 7, 7] -- +│ │ ├─BasicConv2d: 3-53 [1, 32, 7, 7] -- +│ │ │ ├─Conv2d: 4-65 [1, 32, 7, 7] 16,896 │ │ │ └─BatchNorm2d: 4-66 [1, 32, 7, 7] 64 │ │ └─BasicConv2d: 3-54 [1, 128, 7, 7] -- -│ │ │ └─Conv2d: 4-67 [1, 128, 7, 7] 36,864 -│ │ │ └─BatchNorm2d: 4-68 [1, 128, 7, 7] 256 +│ │ ├─Conv2d: 4-67 [1, 128, 7, 7] 36,864 +│ │ └─BatchNorm2d: 4-68 [1, 128, 7, 7] 256 │ └─Sequential: 2-34 [1, 128, 7, 7] -- -│ │ └─MaxPool2d: 3-55 [1, 528, 7, 7] -- -│ │ └─BasicConv2d: 3-56 [1, 128, 7, 7] -- -│ │ │ └─Conv2d: 4-69 [1, 128, 7, 7] 67,584 -│ │ │ └─BatchNorm2d: 4-70 [1, 128, 7, 7] 256 +│ ├─MaxPool2d: 3-55 [1, 528, 7, 7] -- +│ └─BasicConv2d: 3-56 [1, 128, 7, 7] -- +│ ├─Conv2d: 4-69 [1, 128, 7, 7] 67,584 +│ └─BatchNorm2d: 4-70 [1, 128, 7, 7] 256 ├─MaxPool2d: 1-14 [1, 832, 4, 4] -- ├─Inception: 1-15 [1, 832, 4, 4] -- -│ └─BasicConv2d: 2-35 [1, 256, 4, 4] -- -│ │ └─Conv2d: 3-57 [1, 256, 4, 4] 212,992 +│ ├─BasicConv2d: 2-35 [1, 256, 4, 4] -- +│ │ ├─Conv2d: 3-57 [1, 256, 4, 4] 212,992 │ │ └─BatchNorm2d: 3-58 [1, 256, 4, 4] 512 -│ └─Sequential: 2-36 [1, 320, 4, 4] -- -│ │ └─BasicConv2d: 3-59 [1, 160, 4, 4] -- -│ │ │ └─Conv2d: 4-71 [1, 160, 4, 4] 133,120 +│ ├─Sequential: 2-36 [1, 320, 4, 4] -- +│ │ ├─BasicConv2d: 3-59 [1, 160, 4, 4] -- +│ │ │ ├─Conv2d: 4-71 [1, 160, 4, 4] 133,120 │ │ │ └─BatchNorm2d: 4-72 [1, 160, 4, 4] 320 │ │ └─BasicConv2d: 3-60 [1, 320, 4, 4] -- -│ │ │ └─Conv2d: 4-73 [1, 320, 4, 4] 460,800 -│ │ │ └─BatchNorm2d: 4-74 [1, 320, 4, 4] 640 -│ └─Sequential: 2-37 [1, 128, 4, 4] -- -│ │ └─BasicConv2d: 3-61 [1, 32, 4, 4] -- -│ │ │ └─Conv2d: 4-75 [1, 32, 4, 4] 26,624 +│ │ ├─Conv2d: 4-73 [1, 320, 4, 4] 460,800 +│ │ └─BatchNorm2d: 4-74 [1, 320, 4, 4] 640 +│ ├─Sequential: 2-37 [1, 128, 4, 4] -- +│ │ ├─BasicConv2d: 3-61 [1, 32, 4, 4] -- +│ │ │ ├─Conv2d: 4-75 [1, 32, 4, 4] 26,624 │ │ │ └─BatchNorm2d: 4-76 [1, 32, 4, 4] 64 │ │ └─BasicConv2d: 3-62 [1, 128, 4, 4] -- -│ │ │ └─Conv2d: 4-77 [1, 128, 4, 4] 36,864 -│ │ │ └─BatchNorm2d: 4-78 [1, 128, 4, 4] 256 +│ │ ├─Conv2d: 4-77 [1, 128, 4, 4] 36,864 +│ │ └─BatchNorm2d: 4-78 [1, 128, 4, 4] 256 │ └─Sequential: 2-38 [1, 128, 4, 4] -- -│ │ └─MaxPool2d: 3-63 [1, 832, 4, 4] -- -│ │ └─BasicConv2d: 3-64 [1, 128, 4, 4] -- -│ │ │ └─Conv2d: 4-79 [1, 128, 4, 4] 106,496 -│ │ │ └─BatchNorm2d: 4-80 [1, 128, 4, 4] 256 +│ ├─MaxPool2d: 3-63 [1, 832, 4, 4] -- +│ └─BasicConv2d: 3-64 [1, 128, 4, 4] -- +│ ├─Conv2d: 4-79 [1, 128, 4, 4] 106,496 +│ └─BatchNorm2d: 4-80 [1, 128, 4, 4] 256 ├─Inception: 1-16 [1, 1024, 4, 4] -- -│ └─BasicConv2d: 2-39 [1, 384, 4, 4] -- -│ │ └─Conv2d: 3-65 [1, 384, 4, 4] 319,488 +│ ├─BasicConv2d: 2-39 [1, 384, 4, 4] -- +│ │ ├─Conv2d: 3-65 [1, 384, 4, 4] 319,488 │ │ └─BatchNorm2d: 3-66 [1, 384, 4, 4] 768 -│ └─Sequential: 2-40 [1, 384, 4, 4] -- -│ │ └─BasicConv2d: 3-67 [1, 192, 4, 4] -- -│ │ │ └─Conv2d: 4-81 [1, 192, 4, 4] 159,744 +│ ├─Sequential: 2-40 [1, 384, 4, 4] -- +│ │ ├─BasicConv2d: 3-67 [1, 192, 4, 4] -- +│ │ │ ├─Conv2d: 4-81 [1, 192, 4, 4] 159,744 │ │ │ └─BatchNorm2d: 4-82 [1, 192, 4, 4] 384 │ │ └─BasicConv2d: 3-68 [1, 384, 4, 4] -- -│ │ │ └─Conv2d: 4-83 [1, 384, 4, 4] 663,552 -│ │ │ └─BatchNorm2d: 4-84 [1, 384, 4, 4] 768 -│ └─Sequential: 2-41 [1, 128, 4, 4] -- -│ │ └─BasicConv2d: 3-69 [1, 48, 4, 4] -- -│ │ │ └─Conv2d: 4-85 [1, 48, 4, 4] 39,936 +│ │ ├─Conv2d: 4-83 [1, 384, 4, 4] 663,552 +│ │ └─BatchNorm2d: 4-84 [1, 384, 4, 4] 768 +│ ├─Sequential: 2-41 [1, 128, 4, 4] -- +│ │ ├─BasicConv2d: 3-69 [1, 48, 4, 4] -- +│ │ │ ├─Conv2d: 4-85 [1, 48, 4, 4] 39,936 │ │ │ └─BatchNorm2d: 4-86 [1, 48, 4, 4] 96 │ │ └─BasicConv2d: 3-70 [1, 128, 4, 4] -- -│ │ │ └─Conv2d: 4-87 [1, 128, 4, 4] 55,296 -│ │ │ └─BatchNorm2d: 4-88 [1, 128, 4, 4] 256 +│ │ ├─Conv2d: 4-87 [1, 128, 4, 4] 55,296 +│ │ └─BatchNorm2d: 4-88 [1, 128, 4, 4] 256 │ └─Sequential: 2-42 [1, 128, 4, 4] -- -│ │ └─MaxPool2d: 3-71 [1, 832, 4, 4] -- -│ │ └─BasicConv2d: 3-72 [1, 128, 4, 4] -- -│ │ │ └─Conv2d: 4-89 [1, 128, 4, 4] 106,496 -│ │ │ └─BatchNorm2d: 4-90 [1, 128, 4, 4] 256 +│ ├─MaxPool2d: 3-71 [1, 832, 4, 4] -- +│ └─BasicConv2d: 3-72 [1, 128, 4, 4] -- +│ ├─Conv2d: 4-89 [1, 128, 4, 4] 106,496 +│ └─BatchNorm2d: 4-90 [1, 128, 4, 4] 256 ├─AdaptiveAvgPool2d: 1-17 [1, 1024, 1, 1] -- ├─Dropout: 1-18 [1, 1024] -- -├─Linear: 1-19 [1, 1000] 1,025,000 +└─Linear: 1-19 [1, 1000] 1,025,000 ========================================================================================== Total params: 13,004,888 Trainable params: 13,004,888 @@ -241,242 +241,242 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== GoogLeNet [1, 1000] -- ├─BasicConv2d: 1-1 [1, 64, 56, 56] -- -│ └─Conv2d: 2-1 [1, 64, 56, 56] 9,408 +│ ├─Conv2d: 2-1 [1, 64, 56, 56] 9,408 │ └─BatchNorm2d: 2-2 [1, 64, 56, 56] 128 ├─MaxPool2d: 1-2 [1, 64, 28, 28] -- ├─BasicConv2d: 1-3 [1, 64, 28, 28] -- -│ └─Conv2d: 2-3 [1, 64, 28, 28] 4,096 +│ ├─Conv2d: 2-3 [1, 64, 28, 28] 4,096 │ └─BatchNorm2d: 2-4 [1, 64, 28, 28] 128 ├─BasicConv2d: 1-4 [1, 192, 28, 28] -- -│ └─Conv2d: 2-5 [1, 192, 28, 28] 110,592 +│ ├─Conv2d: 2-5 [1, 192, 28, 28] 110,592 │ └─BatchNorm2d: 2-6 [1, 192, 28, 28] 384 ├─MaxPool2d: 1-5 [1, 192, 14, 14] -- ├─Inception: 1-6 [1, 256, 14, 14] -- -│ └─BasicConv2d: 2-7 [1, 64, 14, 14] -- -│ │ └─Conv2d: 3-1 [1, 64, 14, 14] 12,288 +│ ├─BasicConv2d: 2-7 [1, 64, 14, 14] -- +│ │ ├─Conv2d: 3-1 [1, 64, 14, 14] 12,288 │ │ └─BatchNorm2d: 3-2 [1, 64, 14, 14] 128 -│ └─Sequential: 2-8 [1, 128, 14, 14] -- -│ │ └─BasicConv2d: 3-3 [1, 96, 14, 14] -- -│ │ │ └─Conv2d: 4-1 [1, 96, 14, 14] 18,432 +│ ├─Sequential: 2-8 [1, 128, 14, 14] -- +│ │ ├─BasicConv2d: 3-3 [1, 96, 14, 14] -- +│ │ │ ├─Conv2d: 4-1 [1, 96, 14, 14] 18,432 │ │ │ └─BatchNorm2d: 4-2 [1, 96, 14, 14] 192 │ │ └─BasicConv2d: 3-4 [1, 128, 14, 14] -- -│ │ │ └─Conv2d: 4-3 [1, 128, 14, 14] 110,592 -│ │ │ └─BatchNorm2d: 4-4 [1, 128, 14, 14] 256 -│ └─Sequential: 2-9 [1, 32, 14, 14] -- -│ │ └─BasicConv2d: 3-5 [1, 16, 14, 14] -- -│ │ │ └─Conv2d: 4-5 [1, 16, 14, 14] 3,072 +│ │ ├─Conv2d: 4-3 [1, 128, 14, 14] 110,592 +│ │ └─BatchNorm2d: 4-4 [1, 128, 14, 14] 256 +│ ├─Sequential: 2-9 [1, 32, 14, 14] -- +│ │ ├─BasicConv2d: 3-5 [1, 16, 14, 14] -- +│ │ │ ├─Conv2d: 4-5 [1, 16, 14, 14] 3,072 │ │ │ └─BatchNorm2d: 4-6 [1, 16, 14, 14] 32 │ │ └─BasicConv2d: 3-6 [1, 32, 14, 14] -- -│ │ │ └─Conv2d: 4-7 [1, 32, 14, 14] 4,608 -│ │ │ └─BatchNorm2d: 4-8 [1, 32, 14, 14] 64 +│ │ ├─Conv2d: 4-7 [1, 32, 14, 14] 4,608 +│ │ └─BatchNorm2d: 4-8 [1, 32, 14, 14] 64 │ └─Sequential: 2-10 [1, 32, 14, 14] -- -│ │ └─MaxPool2d: 3-7 [1, 192, 14, 14] -- -│ │ └─BasicConv2d: 3-8 [1, 32, 14, 14] -- -│ │ │ └─Conv2d: 4-9 [1, 32, 14, 14] 6,144 -│ │ │ └─BatchNorm2d: 4-10 [1, 32, 14, 14] 64 +│ ├─MaxPool2d: 3-7 [1, 192, 14, 14] -- +│ └─BasicConv2d: 3-8 [1, 32, 14, 14] -- +│ ├─Conv2d: 4-9 [1, 32, 14, 14] 6,144 +│ └─BatchNorm2d: 4-10 [1, 32, 14, 14] 64 ├─Inception: 1-7 [1, 480, 14, 14] -- -│ └─BasicConv2d: 2-11 [1, 128, 14, 14] -- -│ │ └─Conv2d: 3-9 [1, 128, 14, 14] 32,768 +│ ├─BasicConv2d: 2-11 [1, 128, 14, 14] -- +│ │ ├─Conv2d: 3-9 [1, 128, 14, 14] 32,768 │ │ └─BatchNorm2d: 3-10 [1, 128, 14, 14] 256 -│ └─Sequential: 2-12 [1, 192, 14, 14] -- -│ │ └─BasicConv2d: 3-11 [1, 128, 14, 14] -- -│ │ │ └─Conv2d: 4-11 [1, 128, 14, 14] 32,768 +│ ├─Sequential: 2-12 [1, 192, 14, 14] -- +│ │ ├─BasicConv2d: 3-11 [1, 128, 14, 14] -- +│ │ │ ├─Conv2d: 4-11 [1, 128, 14, 14] 32,768 │ │ │ └─BatchNorm2d: 4-12 [1, 128, 14, 14] 256 │ │ └─BasicConv2d: 3-12 [1, 192, 14, 14] -- -│ │ │ └─Conv2d: 4-13 [1, 192, 14, 14] 221,184 -│ │ │ └─BatchNorm2d: 4-14 [1, 192, 14, 14] 384 -│ └─Sequential: 2-13 [1, 96, 14, 14] -- -│ │ └─BasicConv2d: 3-13 [1, 32, 14, 14] -- -│ │ │ └─Conv2d: 4-15 [1, 32, 14, 14] 8,192 +│ │ ├─Conv2d: 4-13 [1, 192, 14, 14] 221,184 +│ │ └─BatchNorm2d: 4-14 [1, 192, 14, 14] 384 +│ ├─Sequential: 2-13 [1, 96, 14, 14] -- +│ │ ├─BasicConv2d: 3-13 [1, 32, 14, 14] -- +│ │ │ ├─Conv2d: 4-15 [1, 32, 14, 14] 8,192 │ │ │ └─BatchNorm2d: 4-16 [1, 32, 14, 14] 64 │ │ └─BasicConv2d: 3-14 [1, 96, 14, 14] -- -│ │ │ └─Conv2d: 4-17 [1, 96, 14, 14] 27,648 -│ │ │ └─BatchNorm2d: 4-18 [1, 96, 14, 14] 192 +│ │ ├─Conv2d: 4-17 [1, 96, 14, 14] 27,648 +│ │ └─BatchNorm2d: 4-18 [1, 96, 14, 14] 192 │ └─Sequential: 2-14 [1, 64, 14, 14] -- -│ │ └─MaxPool2d: 3-15 [1, 256, 14, 14] -- -│ │ └─BasicConv2d: 3-16 [1, 64, 14, 14] -- -│ │ │ └─Conv2d: 4-19 [1, 64, 14, 14] 16,384 -│ │ │ └─BatchNorm2d: 4-20 [1, 64, 14, 14] 128 +│ ├─MaxPool2d: 3-15 [1, 256, 14, 14] -- +│ └─BasicConv2d: 3-16 [1, 64, 14, 14] -- +│ ├─Conv2d: 4-19 [1, 64, 14, 14] 16,384 +│ └─BatchNorm2d: 4-20 [1, 64, 14, 14] 128 ├─MaxPool2d: 1-8 [1, 480, 7, 7] -- ├─Inception: 1-9 [1, 512, 7, 7] -- -│ └─BasicConv2d: 2-15 [1, 192, 7, 7] -- -│ │ └─Conv2d: 3-17 [1, 192, 7, 7] 92,160 +│ ├─BasicConv2d: 2-15 [1, 192, 7, 7] -- +│ │ ├─Conv2d: 3-17 [1, 192, 7, 7] 92,160 │ │ └─BatchNorm2d: 3-18 [1, 192, 7, 7] 384 -│ └─Sequential: 2-16 [1, 208, 7, 7] -- -│ │ └─BasicConv2d: 3-19 [1, 96, 7, 7] -- -│ │ │ └─Conv2d: 4-21 [1, 96, 7, 7] 46,080 +│ ├─Sequential: 2-16 [1, 208, 7, 7] -- +│ │ ├─BasicConv2d: 3-19 [1, 96, 7, 7] -- +│ │ │ ├─Conv2d: 4-21 [1, 96, 7, 7] 46,080 │ │ │ └─BatchNorm2d: 4-22 [1, 96, 7, 7] 192 │ │ └─BasicConv2d: 3-20 [1, 208, 7, 7] -- -│ │ │ └─Conv2d: 4-23 [1, 208, 7, 7] 179,712 -│ │ │ └─BatchNorm2d: 4-24 [1, 208, 7, 7] 416 -│ └─Sequential: 2-17 [1, 48, 7, 7] -- -│ │ └─BasicConv2d: 3-21 [1, 16, 7, 7] -- -│ │ │ └─Conv2d: 4-25 [1, 16, 7, 7] 7,680 +│ │ ├─Conv2d: 4-23 [1, 208, 7, 7] 179,712 +│ │ └─BatchNorm2d: 4-24 [1, 208, 7, 7] 416 +│ ├─Sequential: 2-17 [1, 48, 7, 7] -- +│ │ ├─BasicConv2d: 3-21 [1, 16, 7, 7] -- +│ │ │ ├─Conv2d: 4-25 [1, 16, 7, 7] 7,680 │ │ │ └─BatchNorm2d: 4-26 [1, 16, 7, 7] 32 │ │ └─BasicConv2d: 3-22 [1, 48, 7, 7] -- -│ │ │ └─Conv2d: 4-27 [1, 48, 7, 7] 6,912 -│ │ │ └─BatchNorm2d: 4-28 [1, 48, 7, 7] 96 +│ │ ├─Conv2d: 4-27 [1, 48, 7, 7] 6,912 +│ │ └─BatchNorm2d: 4-28 [1, 48, 7, 7] 96 │ └─Sequential: 2-18 [1, 64, 7, 7] -- -│ │ └─MaxPool2d: 3-23 [1, 480, 7, 7] -- -│ │ └─BasicConv2d: 3-24 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-29 [1, 64, 7, 7] 30,720 -│ │ │ └─BatchNorm2d: 4-30 [1, 64, 7, 7] 128 +│ ├─MaxPool2d: 3-23 [1, 480, 7, 7] -- +│ └─BasicConv2d: 3-24 [1, 64, 7, 7] -- +│ ├─Conv2d: 4-29 [1, 64, 7, 7] 30,720 +│ └─BatchNorm2d: 4-30 [1, 64, 7, 7] 128 ├─InceptionAux: 1-10 [1, 1000] -- -│ └─BasicConv2d: 2-19 [1, 128, 4, 4] -- -│ │ └─Conv2d: 3-25 [1, 128, 4, 4] 65,536 +│ ├─BasicConv2d: 2-19 [1, 128, 4, 4] -- +│ │ ├─Conv2d: 3-25 [1, 128, 4, 4] 65,536 │ │ └─BatchNorm2d: 3-26 [1, 128, 4, 4] 256 -│ └─Linear: 2-20 [1, 1024] 2,098,176 -│ └─Dropout: 2-21 [1, 1024] -- +│ ├─Linear: 2-20 [1, 1024] 2,098,176 +│ ├─Dropout: 2-21 [1, 1024] -- │ └─Linear: 2-22 [1, 1000] 1,025,000 ├─Inception: 1-11 [1, 512, 7, 7] -- -│ └─BasicConv2d: 2-23 [1, 160, 7, 7] -- -│ │ └─Conv2d: 3-27 [1, 160, 7, 7] 81,920 +│ ├─BasicConv2d: 2-23 [1, 160, 7, 7] -- +│ │ ├─Conv2d: 3-27 [1, 160, 7, 7] 81,920 │ │ └─BatchNorm2d: 3-28 [1, 160, 7, 7] 320 -│ └─Sequential: 2-24 [1, 224, 7, 7] -- -│ │ └─BasicConv2d: 3-29 [1, 112, 7, 7] -- -│ │ │ └─Conv2d: 4-31 [1, 112, 7, 7] 57,344 +│ ├─Sequential: 2-24 [1, 224, 7, 7] -- +│ │ ├─BasicConv2d: 3-29 [1, 112, 7, 7] -- +│ │ │ ├─Conv2d: 4-31 [1, 112, 7, 7] 57,344 │ │ │ └─BatchNorm2d: 4-32 [1, 112, 7, 7] 224 │ │ └─BasicConv2d: 3-30 [1, 224, 7, 7] -- -│ │ │ └─Conv2d: 4-33 [1, 224, 7, 7] 225,792 -│ │ │ └─BatchNorm2d: 4-34 [1, 224, 7, 7] 448 -│ └─Sequential: 2-25 [1, 64, 7, 7] -- -│ │ └─BasicConv2d: 3-31 [1, 24, 7, 7] -- -│ │ │ └─Conv2d: 4-35 [1, 24, 7, 7] 12,288 +│ │ ├─Conv2d: 4-33 [1, 224, 7, 7] 225,792 +│ │ └─BatchNorm2d: 4-34 [1, 224, 7, 7] 448 +│ ├─Sequential: 2-25 [1, 64, 7, 7] -- +│ │ ├─BasicConv2d: 3-31 [1, 24, 7, 7] -- +│ │ │ ├─Conv2d: 4-35 [1, 24, 7, 7] 12,288 │ │ │ └─BatchNorm2d: 4-36 [1, 24, 7, 7] 48 │ │ └─BasicConv2d: 3-32 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-37 [1, 64, 7, 7] 13,824 -│ │ │ └─BatchNorm2d: 4-38 [1, 64, 7, 7] 128 +│ │ ├─Conv2d: 4-37 [1, 64, 7, 7] 13,824 +│ │ └─BatchNorm2d: 4-38 [1, 64, 7, 7] 128 │ └─Sequential: 2-26 [1, 64, 7, 7] -- -│ │ └─MaxPool2d: 3-33 [1, 512, 7, 7] -- -│ │ └─BasicConv2d: 3-34 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-39 [1, 64, 7, 7] 32,768 -│ │ │ └─BatchNorm2d: 4-40 [1, 64, 7, 7] 128 +│ ├─MaxPool2d: 3-33 [1, 512, 7, 7] -- +│ └─BasicConv2d: 3-34 [1, 64, 7, 7] -- +│ ├─Conv2d: 4-39 [1, 64, 7, 7] 32,768 +│ └─BatchNorm2d: 4-40 [1, 64, 7, 7] 128 ├─Inception: 1-12 [1, 512, 7, 7] -- -│ └─BasicConv2d: 2-27 [1, 128, 7, 7] -- -│ │ └─Conv2d: 3-35 [1, 128, 7, 7] 65,536 +│ ├─BasicConv2d: 2-27 [1, 128, 7, 7] -- +│ │ ├─Conv2d: 3-35 [1, 128, 7, 7] 65,536 │ │ └─BatchNorm2d: 3-36 [1, 128, 7, 7] 256 -│ └─Sequential: 2-28 [1, 256, 7, 7] -- -│ │ └─BasicConv2d: 3-37 [1, 128, 7, 7] -- -│ │ │ └─Conv2d: 4-41 [1, 128, 7, 7] 65,536 +│ ├─Sequential: 2-28 [1, 256, 7, 7] -- +│ │ ├─BasicConv2d: 3-37 [1, 128, 7, 7] -- +│ │ │ ├─Conv2d: 4-41 [1, 128, 7, 7] 65,536 │ │ │ └─BatchNorm2d: 4-42 [1, 128, 7, 7] 256 │ │ └─BasicConv2d: 3-38 [1, 256, 7, 7] -- -│ │ │ └─Conv2d: 4-43 [1, 256, 7, 7] 294,912 -│ │ │ └─BatchNorm2d: 4-44 [1, 256, 7, 7] 512 -│ └─Sequential: 2-29 [1, 64, 7, 7] -- -│ │ └─BasicConv2d: 3-39 [1, 24, 7, 7] -- -│ │ │ └─Conv2d: 4-45 [1, 24, 7, 7] 12,288 +│ │ ├─Conv2d: 4-43 [1, 256, 7, 7] 294,912 +│ │ └─BatchNorm2d: 4-44 [1, 256, 7, 7] 512 +│ ├─Sequential: 2-29 [1, 64, 7, 7] -- +│ │ ├─BasicConv2d: 3-39 [1, 24, 7, 7] -- +│ │ │ ├─Conv2d: 4-45 [1, 24, 7, 7] 12,288 │ │ │ └─BatchNorm2d: 4-46 [1, 24, 7, 7] 48 │ │ └─BasicConv2d: 3-40 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-47 [1, 64, 7, 7] 13,824 -│ │ │ └─BatchNorm2d: 4-48 [1, 64, 7, 7] 128 +│ │ ├─Conv2d: 4-47 [1, 64, 7, 7] 13,824 +│ │ └─BatchNorm2d: 4-48 [1, 64, 7, 7] 128 │ └─Sequential: 2-30 [1, 64, 7, 7] -- -│ │ └─MaxPool2d: 3-41 [1, 512, 7, 7] -- -│ │ └─BasicConv2d: 3-42 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-49 [1, 64, 7, 7] 32,768 -│ │ │ └─BatchNorm2d: 4-50 [1, 64, 7, 7] 128 +│ ├─MaxPool2d: 3-41 [1, 512, 7, 7] -- +│ └─BasicConv2d: 3-42 [1, 64, 7, 7] -- +│ ├─Conv2d: 4-49 [1, 64, 7, 7] 32,768 +│ └─BatchNorm2d: 4-50 [1, 64, 7, 7] 128 ├─Inception: 1-13 [1, 528, 7, 7] -- -│ └─BasicConv2d: 2-31 [1, 112, 7, 7] -- -│ │ └─Conv2d: 3-43 [1, 112, 7, 7] 57,344 +│ ├─BasicConv2d: 2-31 [1, 112, 7, 7] -- +│ │ ├─Conv2d: 3-43 [1, 112, 7, 7] 57,344 │ │ └─BatchNorm2d: 3-44 [1, 112, 7, 7] 224 -│ └─Sequential: 2-32 [1, 288, 7, 7] -- -│ │ └─BasicConv2d: 3-45 [1, 144, 7, 7] -- -│ │ │ └─Conv2d: 4-51 [1, 144, 7, 7] 73,728 +│ ├─Sequential: 2-32 [1, 288, 7, 7] -- +│ │ ├─BasicConv2d: 3-45 [1, 144, 7, 7] -- +│ │ │ ├─Conv2d: 4-51 [1, 144, 7, 7] 73,728 │ │ │ └─BatchNorm2d: 4-52 [1, 144, 7, 7] 288 │ │ └─BasicConv2d: 3-46 [1, 288, 7, 7] -- -│ │ │ └─Conv2d: 4-53 [1, 288, 7, 7] 373,248 -│ │ │ └─BatchNorm2d: 4-54 [1, 288, 7, 7] 576 -│ └─Sequential: 2-33 [1, 64, 7, 7] -- -│ │ └─BasicConv2d: 3-47 [1, 32, 7, 7] -- -│ │ │ └─Conv2d: 4-55 [1, 32, 7, 7] 16,384 +│ │ ├─Conv2d: 4-53 [1, 288, 7, 7] 373,248 +│ │ └─BatchNorm2d: 4-54 [1, 288, 7, 7] 576 +│ ├─Sequential: 2-33 [1, 64, 7, 7] -- +│ │ ├─BasicConv2d: 3-47 [1, 32, 7, 7] -- +│ │ │ ├─Conv2d: 4-55 [1, 32, 7, 7] 16,384 │ │ │ └─BatchNorm2d: 4-56 [1, 32, 7, 7] 64 │ │ └─BasicConv2d: 3-48 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-57 [1, 64, 7, 7] 18,432 -│ │ │ └─BatchNorm2d: 4-58 [1, 64, 7, 7] 128 +│ │ ├─Conv2d: 4-57 [1, 64, 7, 7] 18,432 +│ │ └─BatchNorm2d: 4-58 [1, 64, 7, 7] 128 │ └─Sequential: 2-34 [1, 64, 7, 7] -- -│ │ └─MaxPool2d: 3-49 [1, 512, 7, 7] -- -│ │ └─BasicConv2d: 3-50 [1, 64, 7, 7] -- -│ │ │ └─Conv2d: 4-59 [1, 64, 7, 7] 32,768 -│ │ │ └─BatchNorm2d: 4-60 [1, 64, 7, 7] 128 +│ ├─MaxPool2d: 3-49 [1, 512, 7, 7] -- +│ └─BasicConv2d: 3-50 [1, 64, 7, 7] -- +│ ├─Conv2d: 4-59 [1, 64, 7, 7] 32,768 +│ └─BatchNorm2d: 4-60 [1, 64, 7, 7] 128 ├─InceptionAux: 1-14 [1, 1000] -- -│ └─BasicConv2d: 2-35 [1, 128, 4, 4] -- -│ │ └─Conv2d: 3-51 [1, 128, 4, 4] 67,584 +│ ├─BasicConv2d: 2-35 [1, 128, 4, 4] -- +│ │ ├─Conv2d: 3-51 [1, 128, 4, 4] 67,584 │ │ └─BatchNorm2d: 3-52 [1, 128, 4, 4] 256 -│ └─Linear: 2-36 [1, 1024] 2,098,176 -│ └─Dropout: 2-37 [1, 1024] -- +│ ├─Linear: 2-36 [1, 1024] 2,098,176 +│ ├─Dropout: 2-37 [1, 1024] -- │ └─Linear: 2-38 [1, 1000] 1,025,000 ├─Inception: 1-15 [1, 832, 7, 7] -- -│ └─BasicConv2d: 2-39 [1, 256, 7, 7] -- -│ │ └─Conv2d: 3-53 [1, 256, 7, 7] 135,168 +│ ├─BasicConv2d: 2-39 [1, 256, 7, 7] -- +│ │ ├─Conv2d: 3-53 [1, 256, 7, 7] 135,168 │ │ └─BatchNorm2d: 3-54 [1, 256, 7, 7] 512 -│ └─Sequential: 2-40 [1, 320, 7, 7] -- -│ │ └─BasicConv2d: 3-55 [1, 160, 7, 7] -- -│ │ │ └─Conv2d: 4-61 [1, 160, 7, 7] 84,480 +│ ├─Sequential: 2-40 [1, 320, 7, 7] -- +│ │ ├─BasicConv2d: 3-55 [1, 160, 7, 7] -- +│ │ │ ├─Conv2d: 4-61 [1, 160, 7, 7] 84,480 │ │ │ └─BatchNorm2d: 4-62 [1, 160, 7, 7] 320 │ │ └─BasicConv2d: 3-56 [1, 320, 7, 7] -- -│ │ │ └─Conv2d: 4-63 [1, 320, 7, 7] 460,800 -│ │ │ └─BatchNorm2d: 4-64 [1, 320, 7, 7] 640 -│ └─Sequential: 2-41 [1, 128, 7, 7] -- -│ │ └─BasicConv2d: 3-57 [1, 32, 7, 7] -- -│ │ │ └─Conv2d: 4-65 [1, 32, 7, 7] 16,896 +│ │ ├─Conv2d: 4-63 [1, 320, 7, 7] 460,800 +│ │ └─BatchNorm2d: 4-64 [1, 320, 7, 7] 640 +│ ├─Sequential: 2-41 [1, 128, 7, 7] -- +│ │ ├─BasicConv2d: 3-57 [1, 32, 7, 7] -- +│ │ │ ├─Conv2d: 4-65 [1, 32, 7, 7] 16,896 │ │ │ └─BatchNorm2d: 4-66 [1, 32, 7, 7] 64 │ │ └─BasicConv2d: 3-58 [1, 128, 7, 7] -- -│ │ │ └─Conv2d: 4-67 [1, 128, 7, 7] 36,864 -│ │ │ └─BatchNorm2d: 4-68 [1, 128, 7, 7] 256 +│ │ ├─Conv2d: 4-67 [1, 128, 7, 7] 36,864 +│ │ └─BatchNorm2d: 4-68 [1, 128, 7, 7] 256 │ └─Sequential: 2-42 [1, 128, 7, 7] -- -│ │ └─MaxPool2d: 3-59 [1, 528, 7, 7] -- -│ │ └─BasicConv2d: 3-60 [1, 128, 7, 7] -- -│ │ │ └─Conv2d: 4-69 [1, 128, 7, 7] 67,584 -│ │ │ └─BatchNorm2d: 4-70 [1, 128, 7, 7] 256 +│ ├─MaxPool2d: 3-59 [1, 528, 7, 7] -- +│ └─BasicConv2d: 3-60 [1, 128, 7, 7] -- +│ ├─Conv2d: 4-69 [1, 128, 7, 7] 67,584 +│ └─BatchNorm2d: 4-70 [1, 128, 7, 7] 256 ├─MaxPool2d: 1-16 [1, 832, 4, 4] -- ├─Inception: 1-17 [1, 832, 4, 4] -- -│ └─BasicConv2d: 2-43 [1, 256, 4, 4] -- -│ │ └─Conv2d: 3-61 [1, 256, 4, 4] 212,992 +│ ├─BasicConv2d: 2-43 [1, 256, 4, 4] -- +│ │ ├─Conv2d: 3-61 [1, 256, 4, 4] 212,992 │ │ └─BatchNorm2d: 3-62 [1, 256, 4, 4] 512 -│ └─Sequential: 2-44 [1, 320, 4, 4] -- -│ │ └─BasicConv2d: 3-63 [1, 160, 4, 4] -- -│ │ │ └─Conv2d: 4-71 [1, 160, 4, 4] 133,120 +│ ├─Sequential: 2-44 [1, 320, 4, 4] -- +│ │ ├─BasicConv2d: 3-63 [1, 160, 4, 4] -- +│ │ │ ├─Conv2d: 4-71 [1, 160, 4, 4] 133,120 │ │ │ └─BatchNorm2d: 4-72 [1, 160, 4, 4] 320 │ │ └─BasicConv2d: 3-64 [1, 320, 4, 4] -- -│ │ │ └─Conv2d: 4-73 [1, 320, 4, 4] 460,800 -│ │ │ └─BatchNorm2d: 4-74 [1, 320, 4, 4] 640 -│ └─Sequential: 2-45 [1, 128, 4, 4] -- -│ │ └─BasicConv2d: 3-65 [1, 32, 4, 4] -- -│ │ │ └─Conv2d: 4-75 [1, 32, 4, 4] 26,624 +│ │ ├─Conv2d: 4-73 [1, 320, 4, 4] 460,800 +│ │ └─BatchNorm2d: 4-74 [1, 320, 4, 4] 640 +│ ├─Sequential: 2-45 [1, 128, 4, 4] -- +│ │ ├─BasicConv2d: 3-65 [1, 32, 4, 4] -- +│ │ │ ├─Conv2d: 4-75 [1, 32, 4, 4] 26,624 │ │ │ └─BatchNorm2d: 4-76 [1, 32, 4, 4] 64 │ │ └─BasicConv2d: 3-66 [1, 128, 4, 4] -- -│ │ │ └─Conv2d: 4-77 [1, 128, 4, 4] 36,864 -│ │ │ └─BatchNorm2d: 4-78 [1, 128, 4, 4] 256 +│ │ ├─Conv2d: 4-77 [1, 128, 4, 4] 36,864 +│ │ └─BatchNorm2d: 4-78 [1, 128, 4, 4] 256 │ └─Sequential: 2-46 [1, 128, 4, 4] -- -│ │ └─MaxPool2d: 3-67 [1, 832, 4, 4] -- -│ │ └─BasicConv2d: 3-68 [1, 128, 4, 4] -- -│ │ │ └─Conv2d: 4-79 [1, 128, 4, 4] 106,496 -│ │ │ └─BatchNorm2d: 4-80 [1, 128, 4, 4] 256 +│ ├─MaxPool2d: 3-67 [1, 832, 4, 4] -- +│ └─BasicConv2d: 3-68 [1, 128, 4, 4] -- +│ ├─Conv2d: 4-79 [1, 128, 4, 4] 106,496 +│ └─BatchNorm2d: 4-80 [1, 128, 4, 4] 256 ├─Inception: 1-18 [1, 1024, 4, 4] -- -│ └─BasicConv2d: 2-47 [1, 384, 4, 4] -- -│ │ └─Conv2d: 3-69 [1, 384, 4, 4] 319,488 +│ ├─BasicConv2d: 2-47 [1, 384, 4, 4] -- +│ │ ├─Conv2d: 3-69 [1, 384, 4, 4] 319,488 │ │ └─BatchNorm2d: 3-70 [1, 384, 4, 4] 768 -│ └─Sequential: 2-48 [1, 384, 4, 4] -- -│ │ └─BasicConv2d: 3-71 [1, 192, 4, 4] -- -│ │ │ └─Conv2d: 4-81 [1, 192, 4, 4] 159,744 +│ ├─Sequential: 2-48 [1, 384, 4, 4] -- +│ │ ├─BasicConv2d: 3-71 [1, 192, 4, 4] -- +│ │ │ ├─Conv2d: 4-81 [1, 192, 4, 4] 159,744 │ │ │ └─BatchNorm2d: 4-82 [1, 192, 4, 4] 384 │ │ └─BasicConv2d: 3-72 [1, 384, 4, 4] -- -│ │ │ └─Conv2d: 4-83 [1, 384, 4, 4] 663,552 -│ │ │ └─BatchNorm2d: 4-84 [1, 384, 4, 4] 768 -│ └─Sequential: 2-49 [1, 128, 4, 4] -- -│ │ └─BasicConv2d: 3-73 [1, 48, 4, 4] -- -│ │ │ └─Conv2d: 4-85 [1, 48, 4, 4] 39,936 +│ │ ├─Conv2d: 4-83 [1, 384, 4, 4] 663,552 +│ │ └─BatchNorm2d: 4-84 [1, 384, 4, 4] 768 +│ ├─Sequential: 2-49 [1, 128, 4, 4] -- +│ │ ├─BasicConv2d: 3-73 [1, 48, 4, 4] -- +│ │ │ ├─Conv2d: 4-85 [1, 48, 4, 4] 39,936 │ │ │ └─BatchNorm2d: 4-86 [1, 48, 4, 4] 96 │ │ └─BasicConv2d: 3-74 [1, 128, 4, 4] -- -│ │ │ └─Conv2d: 4-87 [1, 128, 4, 4] 55,296 -│ │ │ └─BatchNorm2d: 4-88 [1, 128, 4, 4] 256 +│ │ ├─Conv2d: 4-87 [1, 128, 4, 4] 55,296 +│ │ └─BatchNorm2d: 4-88 [1, 128, 4, 4] 256 │ └─Sequential: 2-50 [1, 128, 4, 4] -- -│ │ └─MaxPool2d: 3-75 [1, 832, 4, 4] -- -│ │ └─BasicConv2d: 3-76 [1, 128, 4, 4] -- -│ │ │ └─Conv2d: 4-89 [1, 128, 4, 4] 106,496 -│ │ │ └─BatchNorm2d: 4-90 [1, 128, 4, 4] 256 +│ ├─MaxPool2d: 3-75 [1, 832, 4, 4] -- +│ └─BasicConv2d: 3-76 [1, 128, 4, 4] -- +│ ├─Conv2d: 4-89 [1, 128, 4, 4] 106,496 +│ └─BatchNorm2d: 4-90 [1, 128, 4, 4] 256 ├─AdaptiveAvgPool2d: 1-19 [1, 1024, 1, 1] -- ├─Dropout: 1-20 [1, 1024] -- -├─Linear: 1-21 [1, 1000] 1,025,000 +└─Linear: 1-21 [1, 1000] 1,025,000 ========================================================================================== Total params: 13,004,888 Trainable params: 13,004,888 diff --git a/tests/test_output/hide_recursive_layers.out b/tests/test_output/hide_recursive_layers.out index 559527e..c8749d2 100644 --- a/tests/test_output/hide_recursive_layers.out +++ b/tests/test_output/hide_recursive_layers.out @@ -9,7 +9,7 @@ SimpleRNN [2, 2] 9 ├─LSTMCell: 1-5 [2, 2] (recursive) ├─Tanh: 1-6 [2, 2] -- ├─LSTMCell: 1-7 [2, 2] (recursive) -├─Tanh: 1-8 [2, 2] -- +└─Tanh: 1-8 [2, 2] -- ========================================================================================== Total params: 65 Trainable params: 65 @@ -26,7 +26,7 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== SimpleRNN [2, 2] 9 ├─LSTMCell: 1-1 [2, 2] 56 -├─Tanh: 1-2 [2, 2] -- +└─Tanh: 1-2 [2, 2] -- ========================================================================================== Total params: 65 Trainable params: 65 diff --git a/tests/test_output/hide_recursive_layers_outside_loop.out b/tests/test_output/hide_recursive_layers_outside_loop.out index 2a34f65..60d9a28 100644 --- a/tests/test_output/hide_recursive_layers_outside_loop.out +++ b/tests/test_output/hide_recursive_layers_outside_loop.out @@ -11,7 +11,7 @@ SimpleRNN [2, 3] -- ├─LSTMCell: 1-7 [2, 2] (recursive) ├─Tanh: 1-8 [2, 2] -- ├─Linear: 1-9 [2, 3] 9 -├─Tanh: 1-10 [2, 3] -- +└─Tanh: 1-10 [2, 3] -- ========================================================================================== Total params: 65 Trainable params: 65 @@ -29,7 +29,7 @@ Layer (type:depth-idx) Output Shape Param # SimpleRNN [2, 3] -- ├─LSTMCell: 1-1 [2, 2] 56 ├─Tanh: 1-2 [2, 2] -- -├─Linear: 1-9 [2, 3] 9 +└─Linear: 1-9 [2, 3] 9 ========================================================================================== Total params: 65 Trainable params: 65 diff --git a/tests/test_output/highly_nested_dict_model.out b/tests/test_output/highly_nested_dict_model.out index 636ca1d..4ef061a 100644 --- a/tests/test_output/highly_nested_dict_model.out +++ b/tests/test_output/highly_nested_dict_model.out @@ -3,7 +3,7 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== HighlyNestedDictModel [10] -- ├─Linear: 1-1 [10] 110 -├─Linear: 1-2 [10] 110 +└─Linear: 1-2 [10] 110 ========================================================================================== Total params: 220 Trainable params: 220 diff --git a/tests/test_output/input_tensor.out b/tests/test_output/input_tensor.out index eefa1f3..9904310 100644 --- a/tests/test_output/input_tensor.out +++ b/tests/test_output/input_tensor.out @@ -6,7 +6,7 @@ SingleInputNet [5, 10] -- ├─Conv2d: 1-2 [5, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [5, 20, 8, 8] -- ├─Linear: 1-4 [5, 50] 16,050 -├─Linear: 1-5 [5, 10] 510 +└─Linear: 1-5 [5, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/jit.out b/tests/test_output/jit.out index b529710..892d09a 100644 --- a/tests/test_output/jit.out +++ b/tests/test_output/jit.out @@ -2,12 +2,12 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== LinearModel [64, 1] -- -├─Sequential: 1-1 [64, 1] -- -│ └─Linear: 2-1 [64, 128] 16,512 -│ └─ReLU: 2-2 [64, 128] -- -│ └─Linear: 2-3 [64, 128] 16,512 -│ └─ReLU: 2-4 [64, 128] -- -│ └─Linear: 2-5 [64, 1] 129 +└─Sequential: 1-1 [64, 1] -- + ├─Linear: 2-1 [64, 128] 16,512 + ├─ReLU: 2-2 [64, 128] -- + ├─Linear: 2-3 [64, 128] 16,512 + ├─ReLU: 2-4 [64, 128] -- + └─Linear: 2-5 [64, 1] 129 ========================================================================================== Total params: 33,153 Trainable params: 33,153 @@ -23,12 +23,12 @@ Estimated Total Size (MB): 0.30 Layer (type:depth-idx) Output Shape Param # ========================================================================================== LinearModel -- -- -├─Sequential: 1-1 -- -- -│ └─Linear: 2-1 -- 16,512 -│ └─ReLU: 2-2 -- -- -│ └─Linear: 2-3 -- 16,512 -│ └─ReLU: 2-4 -- -- -│ └─Linear: 2-5 -- 129 +└─Sequential: 1-1 -- -- + ├─Linear: 2-1 -- 16,512 + ├─ReLU: 2-2 -- -- + ├─Linear: 2-3 -- 16,512 + ├─ReLU: 2-4 -- -- + └─Linear: 2-5 -- 129 ========================================================================================== Total params: 33,153 Trainable params: 33,153 diff --git a/tests/test_output/linear_model_half.out b/tests/test_output/linear_model_half.out index 62b5a4d..45574af 100644 --- a/tests/test_output/linear_model_half.out +++ b/tests/test_output/linear_model_half.out @@ -2,12 +2,12 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== LinearModel [64, 1] -- -├─Sequential: 1-1 [64, 1] -- -│ └─Linear: 2-1 [64, 128] 16,512 -│ └─ReLU: 2-2 [64, 128] -- -│ └─Linear: 2-3 [64, 128] 16,512 -│ └─ReLU: 2-4 [64, 128] -- -│ └─Linear: 2-5 [64, 1] 129 +└─Sequential: 1-1 [64, 1] -- + ├─Linear: 2-1 [64, 128] 16,512 + ├─ReLU: 2-2 [64, 128] -- + ├─Linear: 2-3 [64, 128] 16,512 + ├─ReLU: 2-4 [64, 128] -- + └─Linear: 2-5 [64, 1] 129 ========================================================================================== Total params: 33,153 Trainable params: 33,153 @@ -23,12 +23,12 @@ Estimated Total Size (MB): 0.30 Layer (type:depth-idx) Output Shape Param # ========================================================================================== LinearModel [64, 1] -- -├─Sequential: 1-1 [64, 1] -- -│ └─Linear: 2-1 [64, 128] 16,512 -│ └─ReLU: 2-2 [64, 128] -- -│ └─Linear: 2-3 [64, 128] 16,512 -│ └─ReLU: 2-4 [64, 128] -- -│ └─Linear: 2-5 [64, 1] 129 +└─Sequential: 1-1 [64, 1] -- + ├─Linear: 2-1 [64, 128] 16,512 + ├─ReLU: 2-2 [64, 128] -- + ├─Linear: 2-3 [64, 128] 16,512 + ├─ReLU: 2-4 [64, 128] -- + └─Linear: 2-5 [64, 1] 129 ========================================================================================== Total params: 33,153 Trainable params: 33,153 diff --git a/tests/test_output/lstm.out b/tests/test_output/lstm.out index 9c276fb..044a955 100644 --- a/tests/test_output/lstm.out +++ b/tests/test_output/lstm.out @@ -5,17 +5,17 @@ LSTMNet (LSTMNet) -- [100, 20] ├─Embedding (embedding) -- [1, 100, 300] 6,000 6,000 │ └─weight [300, 20] └─6,000 ├─LSTM (encoder) -- [1, 100, 512] 3,768,320 376,832,000 -│ └─weight_ih_l0 [2048, 300] ├─614,400 -│ └─weight_hh_l0 [2048, 512] ├─1,048,576 -│ └─bias_ih_l0 [2048] ├─2,048 -│ └─bias_hh_l0 [2048] ├─2,048 -│ └─weight_ih_l1 [2048, 512] ├─1,048,576 -│ └─weight_hh_l1 [2048, 512] ├─1,048,576 -│ └─bias_ih_l1 [2048] ├─2,048 +│ ├─weight_ih_l0 [2048, 300] ├─614,400 +│ ├─weight_hh_l0 [2048, 512] ├─1,048,576 +│ ├─bias_ih_l0 [2048] ├─2,048 +│ ├─bias_hh_l0 [2048] ├─2,048 +│ ├─weight_ih_l1 [2048, 512] ├─1,048,576 +│ ├─weight_hh_l1 [2048, 512] ├─1,048,576 +│ ├─bias_ih_l1 [2048] ├─2,048 │ └─bias_hh_l1 [2048] └─2,048 -├─Linear (decoder) -- [1, 100, 20] 10,260 10,260 -│ └─weight [512, 20] ├─10,240 -│ └─bias [20] └─20 +└─Linear (decoder) -- [1, 100, 20] 10,260 10,260 + ├─weight [512, 20] ├─10,240 + └─bias [20] └─20 ======================================================================================================================== Total params: 3,784,580 Trainable params: 3,784,580 diff --git a/tests/test_output/lstm_ascii.out b/tests/test_output/lstm_ascii.out new file mode 100644 index 0000000..125635f --- /dev/null +++ b/tests/test_output/lstm_ascii.out @@ -0,0 +1,29 @@ +======================================================================================================================== +Layer (type (var_name)) Kernel Shape Output Shape Param # Mult-Adds +======================================================================================================================== +LSTMNet (LSTMNet) -- [100, 20] -- -- +|--Embedding (embedding) -- [1, 100, 300] 6,000 6,000 +| '--weight [300, 20] '--6,000 +|--LSTM (encoder) -- [1, 100, 512] 3,768,320 376,832,000 +| |--weight_ih_l0 [2048, 300] |--614,400 +| |--weight_hh_l0 [2048, 512] |--1,048,576 +| |--bias_ih_l0 [2048] |--2,048 +| |--bias_hh_l0 [2048] |--2,048 +| |--weight_ih_l1 [2048, 512] |--1,048,576 +| |--weight_hh_l1 [2048, 512] |--1,048,576 +| |--bias_ih_l1 [2048] |--2,048 +| '--bias_hh_l1 [2048] '--2,048 +'--Linear (decoder) -- [1, 100, 20] 10,260 10,260 + |--weight [512, 20] |--10,240 + '--bias [20] '--20 +======================================================================================================================== +Total params: 3,784,580 +Trainable params: 3,784,580 +Non-trainable params: 0 +Total mult-adds (M): 376.85 +======================================================================================================================== +Input size (MB): 0.00 +Forward/backward pass size (MB): 0.67 +Params size (MB): 15.14 +Estimated Total Size (MB): 15.80 +======================================================================================================================== diff --git a/tests/test_output/lstm_custom_batch_size.out b/tests/test_output/lstm_custom_batch_size.out index 63889a8..97d0380 100644 --- a/tests/test_output/lstm_custom_batch_size.out +++ b/tests/test_output/lstm_custom_batch_size.out @@ -4,7 +4,7 @@ Layer (type:depth-idx) Output Shape Param # LSTMNet [100, 1] -- ├─Embedding: 1-1 [100, 1, 300] 6,000 ├─LSTM: 1-2 [100, 1, 512] 3,768,320 -├─Linear: 1-3 [100, 1, 20] 10,260 +└─Linear: 1-3 [100, 1, 20] 10,260 ========================================================================================== Total params: 3,784,580 Trainable params: 3,784,580 diff --git a/tests/test_output/lstm_half.out b/tests/test_output/lstm_half.out index bba1b87..1be8850 100644 --- a/tests/test_output/lstm_half.out +++ b/tests/test_output/lstm_half.out @@ -4,7 +4,7 @@ Layer (type (var_name)) Kernel Shape Output Shape LSTMNet (LSTMNet) -- [100, 20] -- -- ├─Embedding (embedding) -- [1, 100, 300] 6,000 6,000 ├─LSTM (encoder) -- [1, 100, 512] 3,768,320 376,832,000 -├─Linear (decoder) -- [1, 100, 20] 10,260 10,260 +└─Linear (decoder) -- [1, 100, 20] 10,260 10,260 ======================================================================================================================== Total params: 3,784,580 Trainable params: 3,784,580 diff --git a/tests/test_output/mixed_trainable_parameters.out b/tests/test_output/mixed_trainable_parameters.out index 086c2f6..59f75bf 100644 --- a/tests/test_output/mixed_trainable_parameters.out +++ b/tests/test_output/mixed_trainable_parameters.out @@ -3,7 +3,7 @@ Layer (type:depth-idx) Param # ================================================================= MixedTrainableParameters 20 ├─w ├─10 -├─b └─10 +└─b └─10 ================================================================= Total params: 20 Trainable params: 10 diff --git a/tests/test_output/model_with_args.out b/tests/test_output/model_with_args.out index 9139cb5..3fc0783 100644 --- a/tests/test_output/model_with_args.out +++ b/tests/test_output/model_with_args.out @@ -7,7 +7,7 @@ RecursiveNet [1, 64, 28, 28] -- ├─Conv2d: 1-3 [1, 64, 28, 28] (recursive) ├─Conv2d: 1-4 [1, 64, 28, 28] (recursive) ├─Conv2d: 1-5 [1, 64, 28, 28] (recursive) -├─Conv2d: 1-6 [1, 64, 28, 28] (recursive) +└─Conv2d: 1-6 [1, 64, 28, 28] (recursive) ========================================================================================== Total params: 36,928 Trainable params: 36,928 diff --git a/tests/test_output/module_dict.out b/tests/test_output/module_dict.out index 6b8d9f3..cf75793 100644 --- a/tests/test_output/module_dict.out +++ b/tests/test_output/module_dict.out @@ -4,8 +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 -├─ModuleDict: 1-2 -- 1 -│ └─LeakyReLU: 2-2 [1, 10, 1, 1] -- +└─ModuleDict: 1-2 -- 1 + └─LeakyReLU: 2-2 [1, 10, 1, 1] -- ========================================================================================== Total params: 911 Trainable params: 911 @@ -23,8 +23,8 @@ Layer (type:depth-idx) Output Shape Param # ModuleDictModel [1, 10, 1, 1] -- ├─ModuleDict: 1-1 -- 910 │ └─MaxPool2d: 2-1 [1, 10, 1, 1] -- -├─ModuleDict: 1-2 -- -- -│ └─PReLU: 2-2 [1, 10, 1, 1] 1 +└─ModuleDict: 1-2 -- -- + └─PReLU: 2-2 [1, 10, 1, 1] 1 ========================================================================================== Total params: 911 Trainable params: 911 diff --git a/tests/test_output/multiple_input_tensor_args.out b/tests/test_output/multiple_input_tensor_args.out index 431ad0c..3904f85 100644 --- a/tests/test_output/multiple_input_tensor_args.out +++ b/tests/test_output/multiple_input_tensor_args.out @@ -5,7 +5,7 @@ MultipleInputNetDifferentDtypes [2, 10] -- ├─Linear: 1-1 [1, 50] 15,050 ├─Linear: 1-2 [1, 10] 510 ├─Linear: 1-3 [1, 50] 15,050 -├─Linear: 1-4 [1, 10] 510 +└─Linear: 1-4 [1, 10] 510 ========================================================================================== Total params: 31,120 Trainable params: 31,120 diff --git a/tests/test_output/multiple_input_tensor_dict.out b/tests/test_output/multiple_input_tensor_dict.out index 431ad0c..3904f85 100644 --- a/tests/test_output/multiple_input_tensor_dict.out +++ b/tests/test_output/multiple_input_tensor_dict.out @@ -5,7 +5,7 @@ MultipleInputNetDifferentDtypes [2, 10] -- ├─Linear: 1-1 [1, 50] 15,050 ├─Linear: 1-2 [1, 10] 510 ├─Linear: 1-3 [1, 50] 15,050 -├─Linear: 1-4 [1, 10] 510 +└─Linear: 1-4 [1, 10] 510 ========================================================================================== Total params: 31,120 Trainable params: 31,120 diff --git a/tests/test_output/multiple_input_tensor_list.out b/tests/test_output/multiple_input_tensor_list.out index 431ad0c..3904f85 100644 --- a/tests/test_output/multiple_input_tensor_list.out +++ b/tests/test_output/multiple_input_tensor_list.out @@ -5,7 +5,7 @@ MultipleInputNetDifferentDtypes [2, 10] -- ├─Linear: 1-1 [1, 50] 15,050 ├─Linear: 1-2 [1, 10] 510 ├─Linear: 1-3 [1, 50] 15,050 -├─Linear: 1-4 [1, 10] 510 +└─Linear: 1-4 [1, 10] 510 ========================================================================================== Total params: 31,120 Trainable params: 31,120 diff --git a/tests/test_output/multiple_input_types.out b/tests/test_output/multiple_input_types.out index 431ad0c..3904f85 100644 --- a/tests/test_output/multiple_input_types.out +++ b/tests/test_output/multiple_input_types.out @@ -5,7 +5,7 @@ MultipleInputNetDifferentDtypes [2, 10] -- ├─Linear: 1-1 [1, 50] 15,050 ├─Linear: 1-2 [1, 10] 510 ├─Linear: 1-3 [1, 50] 15,050 -├─Linear: 1-4 [1, 10] 510 +└─Linear: 1-4 [1, 10] 510 ========================================================================================== Total params: 31,120 Trainable params: 31,120 diff --git a/tests/test_output/nested_leftover_params.out b/tests/test_output/nested_leftover_params.out index ad55c00..83b4fea 100644 --- a/tests/test_output/nested_leftover_params.out +++ b/tests/test_output/nested_leftover_params.out @@ -3,8 +3,8 @@ Layer (type (var_name)) Output Shape Param # ========================================================================================== InsideModel (InsideModel) [100, 2] 2 ├─Linear (l_0) [100, 1] 3 -├─Inside (inside) [100, 1] 1 -│ └─Linear (l_1) [100, 1] 2 +└─Inside (inside) [100, 1] 1 + └─Linear (l_1) [100, 1] 2 ========================================================================================== Total params: 8 Trainable params: 8 diff --git a/tests/test_output/numpy_model.out b/tests/test_output/numpy_model.out index 8834c28..deea381 100644 --- a/tests/test_output/numpy_model.out +++ b/tests/test_output/numpy_model.out @@ -2,7 +2,7 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== NumpyModel [3] -- -├─Linear: 1-1 [3] 12 +└─Linear: 1-1 [3] 12 ========================================================================================== Total params: 12 Trainable params: 12 diff --git a/tests/test_output/pack_padded.out b/tests/test_output/pack_padded.out index 93b4694..5647f5c 100644 --- a/tests/test_output/pack_padded.out +++ b/tests/test_output/pack_padded.out @@ -5,7 +5,7 @@ PackPaddedLSTM [128, 18] -- ├─Embedding: 1-1 [20, 128, 128] 7,680 ├─LSTM: 1-2 [906, 32] 20,736 ├─Dropout: 1-3 [128, 32] -- -├─Linear: 1-4 [128, 18] 594 +└─Linear: 1-4 [128, 18] 594 ========================================================================================== Total params: 29,010 Trainable params: 29,010 diff --git a/tests/test_output/parameters_with_other_layers.out b/tests/test_output/parameters_with_other_layers.out index 32cf27a..f43dba0 100644 --- a/tests/test_output/parameters_with_other_layers.out +++ b/tests/test_output/parameters_with_other_layers.out @@ -4,9 +4,9 @@ Layer (type:depth-idx) Output Shape Param # ParameterFCNet [3, 32] 8,256 ├─a ├─8,192 ├─b └─64 -├─Linear: 1-1 [3, 32] 2,080 -│ └─weight ├─2,048 -│ └─bias └─32 +└─Linear: 1-1 [3, 32] 2,080 + ├─weight ├─2,048 + └─bias └─32 ========================================================================================== Total params: 10,336 Trainable params: 10,336 @@ -23,7 +23,7 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== ParameterFCNet [3, 64] 8,256 ├─a ├─8,192 -├─b └─64 +└─b └─64 ========================================================================================== Total params: 8,256 Trainable params: 8,256 diff --git a/tests/test_output/partial_jit.out b/tests/test_output/partial_jit.out index 6333d9b..fbab1ca 100644 --- a/tests/test_output/partial_jit.out +++ b/tests/test_output/partial_jit.out @@ -6,7 +6,7 @@ PartialJITModel -- -- ├─Conv2d: 1-2 -- 5,020 ├─Dropout2d: 1-3 -- -- ├─Linear: 1-4 -- 16,050 -├─Linear: 1-5 -- 510 +└─Linear: 1-5 -- 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/pruning.out b/tests/test_output/pruning.out index 68813bd..842dec6 100644 --- a/tests/test_output/pruning.out +++ b/tests/test_output/pruning.out @@ -6,7 +6,7 @@ SingleInputNet [16, 10] -- ├─Conv2d: 1-2 [16, 20, 8, 8] 2,520 ├─Dropout2d: 1-3 [16, 20, 8, 8] -- ├─Linear: 1-4 [16, 50] 8,050 -├─Linear: 1-5 [16, 10] 260 +└─Linear: 1-5 [16, 10] 260 ========================================================================================== Total params: 10,965 Trainable params: 10,965 diff --git a/tests/test_output/recursive.out b/tests/test_output/recursive.out index 9139cb5..3fc0783 100644 --- a/tests/test_output/recursive.out +++ b/tests/test_output/recursive.out @@ -7,7 +7,7 @@ RecursiveNet [1, 64, 28, 28] -- ├─Conv2d: 1-3 [1, 64, 28, 28] (recursive) ├─Conv2d: 1-4 [1, 64, 28, 28] (recursive) ├─Conv2d: 1-5 [1, 64, 28, 28] (recursive) -├─Conv2d: 1-6 [1, 64, 28, 28] (recursive) +└─Conv2d: 1-6 [1, 64, 28, 28] (recursive) ========================================================================================== Total params: 36,928 Trainable params: 36,928 diff --git a/tests/test_output/recursive_with_missing_layers.out b/tests/test_output/recursive_with_missing_layers.out index a3b8a1c..25d8711 100644 --- a/tests/test_output/recursive_with_missing_layers.out +++ b/tests/test_output/recursive_with_missing_layers.out @@ -5,21 +5,21 @@ RecursiveWithMissingLayers (RecursiveWithMissingLayers) [2, 1, 128, 128] ├─Conv2d (out_conv0): 1-1 [2, 8, 128, 128] 608 ├─BatchNorm2d (out_bn0): 1-2 [2, 8, 128, 128] 16 ├─ModuleDict (block0): 1-3 -- -- -│ └─Conv2d (in_conv1): 2-1 [2, 8, 128, 128] 584 -│ └─BatchNorm2d (in_bn1): 2-2 [2, 8, 128, 128] 16 -│ └─Conv2d (in_conv2): 2-3 [2, 8, 128, 128] 584 -│ └─BatchNorm2d (in_bn2): 2-4 [2, 8, 128, 128] 16 -│ └─Conv2d (in_conv3): 2-5 [2, 8, 128, 128] 584 +│ ├─Conv2d (in_conv1): 2-1 [2, 8, 128, 128] 584 +│ ├─BatchNorm2d (in_bn1): 2-2 [2, 8, 128, 128] 16 +│ ├─Conv2d (in_conv2): 2-3 [2, 8, 128, 128] 584 +│ ├─BatchNorm2d (in_bn2): 2-4 [2, 8, 128, 128] 16 +│ ├─Conv2d (in_conv3): 2-5 [2, 8, 128, 128] 584 │ └─BatchNorm2d (in_bn3): 2-6 [2, 8, 128, 128] 16 ├─ModuleDict (block1): 1-4 -- -- -│ └─Conv2d (in_conv4): 2-7 [2, 8, 128, 128] 584 -│ └─BatchNorm2d (in_bn4): 2-8 [2, 8, 128, 128] 16 -│ └─Conv2d (in_conv5): 2-9 [2, 8, 128, 128] 584 -│ └─BatchNorm2d (in_bn5): 2-10 [2, 8, 128, 128] 16 -│ └─Conv2d (in_conv6): 2-11 [2, 8, 128, 128] 584 +│ ├─Conv2d (in_conv4): 2-7 [2, 8, 128, 128] 584 +│ ├─BatchNorm2d (in_bn4): 2-8 [2, 8, 128, 128] 16 +│ ├─Conv2d (in_conv5): 2-9 [2, 8, 128, 128] 584 +│ ├─BatchNorm2d (in_bn5): 2-10 [2, 8, 128, 128] 16 +│ ├─Conv2d (in_conv6): 2-11 [2, 8, 128, 128] 584 │ └─BatchNorm2d (in_bn6): 2-12 [2, 8, 128, 128] 16 ├─Conv2d (out_conv7): 1-5 [2, 1, 128, 128] 9 -├─BatchNorm2d (out_bn7): 1-6 [2, 1, 128, 128] 2 +└─BatchNorm2d (out_bn7): 1-6 [2, 1, 128, 128] 2 ============================================================================================================== Total params: 4,235 Trainable params: 4,235 diff --git a/tests/test_output/register_parameter.out b/tests/test_output/register_parameter.out index bfc4210..bb779d4 100644 --- a/tests/test_output/register_parameter.out +++ b/tests/test_output/register_parameter.out @@ -3,7 +3,7 @@ Layer (type:depth-idx) Param # ================================================================= RegisterParameter 2 ├─Linear: 1-1 6 -├─Linear: 1-2 6 +└─Linear: 1-2 6 ================================================================= Total params: 14 Trainable params: 14 diff --git a/tests/test_output/resnet152.out b/tests/test_output/resnet152.out index 4696a03..c1d4c0b 100644 --- a/tests/test_output/resnet152.out +++ b/tests/test_output/resnet152.out @@ -7,515 +7,515 @@ ResNet [1, 1000] -- ├─ReLU: 1-3 [1, 64, 112, 112] -- ├─MaxPool2d: 1-4 [1, 64, 56, 56] -- ├─Sequential: 1-5 [1, 256, 56, 56] -- -│ └─Bottleneck: 2-1 [1, 256, 56, 56] -- -│ │ └─Conv2d: 3-1 [1, 64, 56, 56] 4,096 -│ │ └─BatchNorm2d: 3-2 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-3 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-4 [1, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-5 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-6 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-7 [1, 256, 56, 56] 16,384 -│ │ └─BatchNorm2d: 3-8 [1, 256, 56, 56] 512 -│ │ └─Sequential: 3-9 [1, 256, 56, 56] 16,896 +│ ├─Bottleneck: 2-1 [1, 256, 56, 56] -- +│ │ ├─Conv2d: 3-1 [1, 64, 56, 56] 4,096 +│ │ ├─BatchNorm2d: 3-2 [1, 64, 56, 56] 128 +│ │ ├─ReLU: 3-3 [1, 64, 56, 56] -- +│ │ ├─Conv2d: 3-4 [1, 64, 56, 56] 36,864 +│ │ ├─BatchNorm2d: 3-5 [1, 64, 56, 56] 128 +│ │ ├─ReLU: 3-6 [1, 64, 56, 56] -- +│ │ ├─Conv2d: 3-7 [1, 256, 56, 56] 16,384 +│ │ ├─BatchNorm2d: 3-8 [1, 256, 56, 56] 512 +│ │ ├─Sequential: 3-9 [1, 256, 56, 56] 16,896 │ │ └─ReLU: 3-10 [1, 256, 56, 56] -- -│ └─Bottleneck: 2-2 [1, 256, 56, 56] -- -│ │ └─Conv2d: 3-11 [1, 64, 56, 56] 16,384 -│ │ └─BatchNorm2d: 3-12 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-13 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-14 [1, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-15 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-16 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-17 [1, 256, 56, 56] 16,384 -│ │ └─BatchNorm2d: 3-18 [1, 256, 56, 56] 512 +│ ├─Bottleneck: 2-2 [1, 256, 56, 56] -- +│ │ ├─Conv2d: 3-11 [1, 64, 56, 56] 16,384 +│ │ ├─BatchNorm2d: 3-12 [1, 64, 56, 56] 128 +│ │ ├─ReLU: 3-13 [1, 64, 56, 56] -- +│ │ ├─Conv2d: 3-14 [1, 64, 56, 56] 36,864 +│ │ ├─BatchNorm2d: 3-15 [1, 64, 56, 56] 128 +│ │ ├─ReLU: 3-16 [1, 64, 56, 56] -- +│ │ ├─Conv2d: 3-17 [1, 256, 56, 56] 16,384 +│ │ ├─BatchNorm2d: 3-18 [1, 256, 56, 56] 512 │ │ └─ReLU: 3-19 [1, 256, 56, 56] -- │ └─Bottleneck: 2-3 [1, 256, 56, 56] -- -│ │ └─Conv2d: 3-20 [1, 64, 56, 56] 16,384 -│ │ └─BatchNorm2d: 3-21 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-22 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-23 [1, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-24 [1, 64, 56, 56] 128 -│ │ └─ReLU: 3-25 [1, 64, 56, 56] -- -│ │ └─Conv2d: 3-26 [1, 256, 56, 56] 16,384 -│ │ └─BatchNorm2d: 3-27 [1, 256, 56, 56] 512 -│ │ └─ReLU: 3-28 [1, 256, 56, 56] -- +│ ├─Conv2d: 3-20 [1, 64, 56, 56] 16,384 +│ ├─BatchNorm2d: 3-21 [1, 64, 56, 56] 128 +│ ├─ReLU: 3-22 [1, 64, 56, 56] -- +│ ├─Conv2d: 3-23 [1, 64, 56, 56] 36,864 +│ ├─BatchNorm2d: 3-24 [1, 64, 56, 56] 128 +│ ├─ReLU: 3-25 [1, 64, 56, 56] -- +│ ├─Conv2d: 3-26 [1, 256, 56, 56] 16,384 +│ ├─BatchNorm2d: 3-27 [1, 256, 56, 56] 512 +│ └─ReLU: 3-28 [1, 256, 56, 56] -- ├─Sequential: 1-6 [1, 512, 28, 28] -- -│ └─Bottleneck: 2-4 [1, 512, 28, 28] -- -│ │ └─Conv2d: 3-29 [1, 128, 56, 56] 32,768 -│ │ └─BatchNorm2d: 3-30 [1, 128, 56, 56] 256 -│ │ └─ReLU: 3-31 [1, 128, 56, 56] -- -│ │ └─Conv2d: 3-32 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-33 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-34 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-35 [1, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-36 [1, 512, 28, 28] 1,024 -│ │ └─Sequential: 3-37 [1, 512, 28, 28] 132,096 +│ ├─Bottleneck: 2-4 [1, 512, 28, 28] -- +│ │ ├─Conv2d: 3-29 [1, 128, 56, 56] 32,768 +│ │ ├─BatchNorm2d: 3-30 [1, 128, 56, 56] 256 +│ │ ├─ReLU: 3-31 [1, 128, 56, 56] -- +│ │ ├─Conv2d: 3-32 [1, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-33 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-34 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-35 [1, 512, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-36 [1, 512, 28, 28] 1,024 +│ │ ├─Sequential: 3-37 [1, 512, 28, 28] 132,096 │ │ └─ReLU: 3-38 [1, 512, 28, 28] -- -│ └─Bottleneck: 2-5 [1, 512, 28, 28] -- -│ │ └─Conv2d: 3-39 [1, 128, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-40 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-41 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-42 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-43 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-44 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-45 [1, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-46 [1, 512, 28, 28] 1,024 +│ ├─Bottleneck: 2-5 [1, 512, 28, 28] -- +│ │ ├─Conv2d: 3-39 [1, 128, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-40 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-41 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-42 [1, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-43 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-44 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-45 [1, 512, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-46 [1, 512, 28, 28] 1,024 │ │ └─ReLU: 3-47 [1, 512, 28, 28] -- -│ └─Bottleneck: 2-6 [1, 512, 28, 28] -- -│ │ └─Conv2d: 3-48 [1, 128, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-49 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-50 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-51 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-52 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-53 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-54 [1, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-55 [1, 512, 28, 28] 1,024 +│ ├─Bottleneck: 2-6 [1, 512, 28, 28] -- +│ │ ├─Conv2d: 3-48 [1, 128, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-49 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-50 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-51 [1, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-52 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-53 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-54 [1, 512, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-55 [1, 512, 28, 28] 1,024 │ │ └─ReLU: 3-56 [1, 512, 28, 28] -- -│ └─Bottleneck: 2-7 [1, 512, 28, 28] -- -│ │ └─Conv2d: 3-57 [1, 128, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-58 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-59 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-60 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-61 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-62 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-63 [1, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-64 [1, 512, 28, 28] 1,024 +│ ├─Bottleneck: 2-7 [1, 512, 28, 28] -- +│ │ ├─Conv2d: 3-57 [1, 128, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-58 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-59 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-60 [1, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-61 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-62 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-63 [1, 512, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-64 [1, 512, 28, 28] 1,024 │ │ └─ReLU: 3-65 [1, 512, 28, 28] -- -│ └─Bottleneck: 2-8 [1, 512, 28, 28] -- -│ │ └─Conv2d: 3-66 [1, 128, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-67 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-68 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-69 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-70 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-71 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-72 [1, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-73 [1, 512, 28, 28] 1,024 +│ ├─Bottleneck: 2-8 [1, 512, 28, 28] -- +│ │ ├─Conv2d: 3-66 [1, 128, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-67 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-68 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-69 [1, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-70 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-71 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-72 [1, 512, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-73 [1, 512, 28, 28] 1,024 │ │ └─ReLU: 3-74 [1, 512, 28, 28] -- -│ └─Bottleneck: 2-9 [1, 512, 28, 28] -- -│ │ └─Conv2d: 3-75 [1, 128, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-76 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-77 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-78 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-79 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-80 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-81 [1, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-82 [1, 512, 28, 28] 1,024 +│ ├─Bottleneck: 2-9 [1, 512, 28, 28] -- +│ │ ├─Conv2d: 3-75 [1, 128, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-76 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-77 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-78 [1, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-79 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-80 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-81 [1, 512, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-82 [1, 512, 28, 28] 1,024 │ │ └─ReLU: 3-83 [1, 512, 28, 28] -- -│ └─Bottleneck: 2-10 [1, 512, 28, 28] -- -│ │ └─Conv2d: 3-84 [1, 128, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-85 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-86 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-87 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-88 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-89 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-90 [1, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-91 [1, 512, 28, 28] 1,024 +│ ├─Bottleneck: 2-10 [1, 512, 28, 28] -- +│ │ ├─Conv2d: 3-84 [1, 128, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-85 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-86 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-87 [1, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-88 [1, 128, 28, 28] 256 +│ │ ├─ReLU: 3-89 [1, 128, 28, 28] -- +│ │ ├─Conv2d: 3-90 [1, 512, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-91 [1, 512, 28, 28] 1,024 │ │ └─ReLU: 3-92 [1, 512, 28, 28] -- │ └─Bottleneck: 2-11 [1, 512, 28, 28] -- -│ │ └─Conv2d: 3-93 [1, 128, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-94 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-95 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-96 [1, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-97 [1, 128, 28, 28] 256 -│ │ └─ReLU: 3-98 [1, 128, 28, 28] -- -│ │ └─Conv2d: 3-99 [1, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-100 [1, 512, 28, 28] 1,024 -│ │ └─ReLU: 3-101 [1, 512, 28, 28] -- +│ ├─Conv2d: 3-93 [1, 128, 28, 28] 65,536 +│ ├─BatchNorm2d: 3-94 [1, 128, 28, 28] 256 +│ ├─ReLU: 3-95 [1, 128, 28, 28] -- +│ ├─Conv2d: 3-96 [1, 128, 28, 28] 147,456 +│ ├─BatchNorm2d: 3-97 [1, 128, 28, 28] 256 +│ ├─ReLU: 3-98 [1, 128, 28, 28] -- +│ ├─Conv2d: 3-99 [1, 512, 28, 28] 65,536 +│ ├─BatchNorm2d: 3-100 [1, 512, 28, 28] 1,024 +│ └─ReLU: 3-101 [1, 512, 28, 28] -- ├─Sequential: 1-7 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-12 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-102 [1, 256, 28, 28] 131,072 -│ │ └─BatchNorm2d: 3-103 [1, 256, 28, 28] 512 -│ │ └─ReLU: 3-104 [1, 256, 28, 28] -- -│ │ └─Conv2d: 3-105 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-106 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-107 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-108 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-109 [1, 1024, 14, 14] 2,048 -│ │ └─Sequential: 3-110 [1, 1024, 14, 14] 526,336 +│ ├─Bottleneck: 2-12 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-102 [1, 256, 28, 28] 131,072 +│ │ ├─BatchNorm2d: 3-103 [1, 256, 28, 28] 512 +│ │ ├─ReLU: 3-104 [1, 256, 28, 28] -- +│ │ ├─Conv2d: 3-105 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-106 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-107 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-108 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-109 [1, 1024, 14, 14] 2,048 +│ │ ├─Sequential: 3-110 [1, 1024, 14, 14] 526,336 │ │ └─ReLU: 3-111 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-13 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-112 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-113 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-114 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-115 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-116 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-117 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-118 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-119 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-13 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-112 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-113 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-114 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-115 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-116 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-117 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-118 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-119 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-120 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-14 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-121 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-122 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-123 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-124 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-125 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-126 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-127 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-128 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-14 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-121 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-122 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-123 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-124 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-125 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-126 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-127 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-128 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-129 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-15 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-130 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-131 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-132 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-133 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-134 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-135 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-136 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-137 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-15 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-130 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-131 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-132 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-133 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-134 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-135 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-136 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-137 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-138 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-16 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-139 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-140 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-141 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-142 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-143 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-144 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-145 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-146 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-16 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-139 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-140 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-141 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-142 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-143 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-144 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-145 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-146 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-147 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-17 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-148 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-149 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-150 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-151 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-152 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-153 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-154 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-155 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-17 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-148 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-149 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-150 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-151 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-152 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-153 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-154 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-155 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-156 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-18 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-157 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-158 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-159 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-160 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-161 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-162 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-163 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-164 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-18 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-157 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-158 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-159 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-160 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-161 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-162 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-163 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-164 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-165 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-19 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-166 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-167 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-168 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-169 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-170 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-171 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-172 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-173 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-19 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-166 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-167 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-168 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-169 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-170 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-171 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-172 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-173 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-174 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-20 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-175 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-176 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-177 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-178 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-179 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-180 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-181 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-182 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-20 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-175 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-176 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-177 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-178 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-179 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-180 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-181 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-182 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-183 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-21 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-184 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-185 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-186 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-187 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-188 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-189 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-190 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-191 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-21 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-184 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-185 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-186 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-187 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-188 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-189 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-190 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-191 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-192 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-22 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-193 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-194 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-195 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-196 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-197 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-198 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-199 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-200 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-22 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-193 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-194 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-195 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-196 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-197 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-198 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-199 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-200 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-201 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-23 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-202 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-203 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-204 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-205 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-206 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-207 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-208 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-209 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-23 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-202 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-203 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-204 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-205 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-206 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-207 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-208 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-209 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-210 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-24 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-211 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-212 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-213 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-214 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-215 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-216 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-217 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-218 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-24 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-211 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-212 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-213 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-214 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-215 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-216 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-217 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-218 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-219 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-25 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-220 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-221 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-222 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-223 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-224 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-225 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-226 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-227 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-25 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-220 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-221 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-222 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-223 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-224 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-225 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-226 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-227 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-228 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-26 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-229 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-230 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-231 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-232 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-233 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-234 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-235 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-236 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-26 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-229 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-230 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-231 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-232 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-233 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-234 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-235 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-236 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-237 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-27 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-238 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-239 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-240 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-241 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-242 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-243 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-244 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-245 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-27 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-238 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-239 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-240 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-241 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-242 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-243 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-244 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-245 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-246 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-28 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-247 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-248 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-249 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-250 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-251 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-252 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-253 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-254 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-28 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-247 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-248 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-249 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-250 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-251 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-252 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-253 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-254 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-255 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-29 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-256 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-257 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-258 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-259 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-260 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-261 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-262 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-263 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-29 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-256 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-257 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-258 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-259 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-260 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-261 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-262 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-263 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-264 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-30 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-265 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-266 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-267 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-268 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-269 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-270 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-271 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-272 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-30 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-265 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-266 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-267 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-268 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-269 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-270 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-271 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-272 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-273 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-31 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-274 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-275 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-276 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-277 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-278 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-279 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-280 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-281 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-31 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-274 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-275 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-276 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-277 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-278 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-279 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-280 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-281 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-282 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-32 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-283 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-284 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-285 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-286 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-287 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-288 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-289 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-290 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-32 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-283 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-284 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-285 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-286 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-287 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-288 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-289 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-290 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-291 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-33 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-292 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-293 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-294 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-295 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-296 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-297 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-298 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-299 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-33 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-292 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-293 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-294 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-295 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-296 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-297 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-298 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-299 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-300 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-34 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-301 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-302 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-303 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-304 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-305 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-306 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-307 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-308 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-34 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-301 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-302 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-303 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-304 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-305 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-306 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-307 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-308 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-309 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-35 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-310 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-311 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-312 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-313 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-314 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-315 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-316 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-317 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-35 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-310 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-311 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-312 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-313 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-314 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-315 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-316 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-317 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-318 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-36 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-319 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-320 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-321 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-322 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-323 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-324 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-325 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-326 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-36 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-319 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-320 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-321 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-322 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-323 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-324 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-325 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-326 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-327 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-37 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-328 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-329 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-330 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-331 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-332 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-333 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-334 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-335 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-37 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-328 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-329 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-330 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-331 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-332 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-333 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-334 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-335 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-336 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-38 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-337 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-338 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-339 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-340 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-341 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-342 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-343 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-344 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-38 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-337 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-338 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-339 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-340 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-341 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-342 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-343 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-344 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-345 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-39 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-346 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-347 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-348 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-349 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-350 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-351 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-352 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-353 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-39 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-346 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-347 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-348 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-349 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-350 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-351 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-352 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-353 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-354 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-40 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-355 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-356 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-357 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-358 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-359 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-360 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-361 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-362 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-40 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-355 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-356 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-357 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-358 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-359 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-360 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-361 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-362 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-363 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-41 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-364 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-365 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-366 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-367 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-368 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-369 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-370 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-371 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-41 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-364 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-365 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-366 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-367 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-368 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-369 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-370 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-371 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-372 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-42 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-373 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-374 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-375 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-376 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-377 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-378 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-379 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-380 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-42 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-373 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-374 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-375 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-376 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-377 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-378 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-379 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-380 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-381 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-43 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-382 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-383 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-384 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-385 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-386 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-387 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-388 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-389 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-43 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-382 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-383 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-384 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-385 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-386 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-387 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-388 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-389 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-390 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-44 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-391 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-392 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-393 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-394 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-395 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-396 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-397 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-398 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-44 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-391 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-392 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-393 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-394 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-395 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-396 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-397 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-398 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-399 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-45 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-400 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-401 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-402 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-403 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-404 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-405 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-406 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-407 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-45 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-400 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-401 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-402 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-403 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-404 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-405 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-406 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-407 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-408 [1, 1024, 14, 14] -- -│ └─Bottleneck: 2-46 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-409 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-410 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-411 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-412 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-413 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-414 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-415 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-416 [1, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-46 [1, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-409 [1, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-410 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-411 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-412 [1, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-413 [1, 256, 14, 14] 512 +│ │ ├─ReLU: 3-414 [1, 256, 14, 14] -- +│ │ ├─Conv2d: 3-415 [1, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-416 [1, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-417 [1, 1024, 14, 14] -- │ └─Bottleneck: 2-47 [1, 1024, 14, 14] -- -│ │ └─Conv2d: 3-418 [1, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-419 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-420 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-421 [1, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-422 [1, 256, 14, 14] 512 -│ │ └─ReLU: 3-423 [1, 256, 14, 14] -- -│ │ └─Conv2d: 3-424 [1, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-425 [1, 1024, 14, 14] 2,048 -│ │ └─ReLU: 3-426 [1, 1024, 14, 14] -- +│ ├─Conv2d: 3-418 [1, 256, 14, 14] 262,144 +│ ├─BatchNorm2d: 3-419 [1, 256, 14, 14] 512 +│ ├─ReLU: 3-420 [1, 256, 14, 14] -- +│ ├─Conv2d: 3-421 [1, 256, 14, 14] 589,824 +│ ├─BatchNorm2d: 3-422 [1, 256, 14, 14] 512 +│ ├─ReLU: 3-423 [1, 256, 14, 14] -- +│ ├─Conv2d: 3-424 [1, 1024, 14, 14] 262,144 +│ ├─BatchNorm2d: 3-425 [1, 1024, 14, 14] 2,048 +│ └─ReLU: 3-426 [1, 1024, 14, 14] -- ├─Sequential: 1-8 [1, 2048, 7, 7] -- -│ └─Bottleneck: 2-48 [1, 2048, 7, 7] -- -│ │ └─Conv2d: 3-427 [1, 512, 14, 14] 524,288 -│ │ └─BatchNorm2d: 3-428 [1, 512, 14, 14] 1,024 -│ │ └─ReLU: 3-429 [1, 512, 14, 14] -- -│ │ └─Conv2d: 3-430 [1, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-431 [1, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-432 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-433 [1, 2048, 7, 7] 1,048,576 -│ │ └─BatchNorm2d: 3-434 [1, 2048, 7, 7] 4,096 -│ │ └─Sequential: 3-435 [1, 2048, 7, 7] 2,101,248 +│ ├─Bottleneck: 2-48 [1, 2048, 7, 7] -- +│ │ ├─Conv2d: 3-427 [1, 512, 14, 14] 524,288 +│ │ ├─BatchNorm2d: 3-428 [1, 512, 14, 14] 1,024 +│ │ ├─ReLU: 3-429 [1, 512, 14, 14] -- +│ │ ├─Conv2d: 3-430 [1, 512, 7, 7] 2,359,296 +│ │ ├─BatchNorm2d: 3-431 [1, 512, 7, 7] 1,024 +│ │ ├─ReLU: 3-432 [1, 512, 7, 7] -- +│ │ ├─Conv2d: 3-433 [1, 2048, 7, 7] 1,048,576 +│ │ ├─BatchNorm2d: 3-434 [1, 2048, 7, 7] 4,096 +│ │ ├─Sequential: 3-435 [1, 2048, 7, 7] 2,101,248 │ │ └─ReLU: 3-436 [1, 2048, 7, 7] -- -│ └─Bottleneck: 2-49 [1, 2048, 7, 7] -- -│ │ └─Conv2d: 3-437 [1, 512, 7, 7] 1,048,576 -│ │ └─BatchNorm2d: 3-438 [1, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-439 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-440 [1, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-441 [1, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-442 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-443 [1, 2048, 7, 7] 1,048,576 -│ │ └─BatchNorm2d: 3-444 [1, 2048, 7, 7] 4,096 +│ ├─Bottleneck: 2-49 [1, 2048, 7, 7] -- +│ │ ├─Conv2d: 3-437 [1, 512, 7, 7] 1,048,576 +│ │ ├─BatchNorm2d: 3-438 [1, 512, 7, 7] 1,024 +│ │ ├─ReLU: 3-439 [1, 512, 7, 7] -- +│ │ ├─Conv2d: 3-440 [1, 512, 7, 7] 2,359,296 +│ │ ├─BatchNorm2d: 3-441 [1, 512, 7, 7] 1,024 +│ │ ├─ReLU: 3-442 [1, 512, 7, 7] -- +│ │ ├─Conv2d: 3-443 [1, 2048, 7, 7] 1,048,576 +│ │ ├─BatchNorm2d: 3-444 [1, 2048, 7, 7] 4,096 │ │ └─ReLU: 3-445 [1, 2048, 7, 7] -- │ └─Bottleneck: 2-50 [1, 2048, 7, 7] -- -│ │ └─Conv2d: 3-446 [1, 512, 7, 7] 1,048,576 -│ │ └─BatchNorm2d: 3-447 [1, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-448 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-449 [1, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-450 [1, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-451 [1, 512, 7, 7] -- -│ │ └─Conv2d: 3-452 [1, 2048, 7, 7] 1,048,576 -│ │ └─BatchNorm2d: 3-453 [1, 2048, 7, 7] 4,096 -│ │ └─ReLU: 3-454 [1, 2048, 7, 7] -- +│ ├─Conv2d: 3-446 [1, 512, 7, 7] 1,048,576 +│ ├─BatchNorm2d: 3-447 [1, 512, 7, 7] 1,024 +│ ├─ReLU: 3-448 [1, 512, 7, 7] -- +│ ├─Conv2d: 3-449 [1, 512, 7, 7] 2,359,296 +│ ├─BatchNorm2d: 3-450 [1, 512, 7, 7] 1,024 +│ ├─ReLU: 3-451 [1, 512, 7, 7] -- +│ ├─Conv2d: 3-452 [1, 2048, 7, 7] 1,048,576 +│ ├─BatchNorm2d: 3-453 [1, 2048, 7, 7] 4,096 +│ └─ReLU: 3-454 [1, 2048, 7, 7] -- ├─AdaptiveAvgPool2d: 1-9 [1, 2048, 1, 1] -- -├─Linear: 1-10 [1, 1000] 2,049,000 +└─Linear: 1-10 [1, 1000] 2,049,000 ========================================================================================== Total params: 60,192,808 Trainable params: 60,192,808 diff --git a/tests/test_output/resnet18_depth_consistency.out b/tests/test_output/resnet18_depth_consistency.out index 3e4d035..0bed835 100644 --- a/tests/test_output/resnet18_depth_consistency.out +++ b/tests/test_output/resnet18_depth_consistency.out @@ -11,7 +11,7 @@ ResNet [1, 1000] -- ├─Sequential: 1-7 [1, 256, 4, 4] 2,099,712 17.96% ├─Sequential: 1-8 [1, 512, 2, 2] 8,393,728 71.81% ├─AdaptiveAvgPool2d: 1-9 [1, 512, 1, 1] -- -- -├─Linear: 1-10 [1, 1000] 513,000 4.39% +└─Linear: 1-10 [1, 1000] 513,000 4.39% =================================================================================================================== Total params: 11,689,512 Trainable params: 11,689,512 @@ -32,19 +32,19 @@ ResNet [1, 1000] -- ├─ReLU: 1-3 [1, 64, 32, 32] -- -- ├─MaxPool2d: 1-4 [1, 64, 16, 16] -- -- ├─Sequential: 1-5 [1, 64, 16, 16] -- -- -│ └─BasicBlock: 2-1 [1, 64, 16, 16] 73,984 0.63% +│ ├─BasicBlock: 2-1 [1, 64, 16, 16] 73,984 0.63% │ └─BasicBlock: 2-2 [1, 64, 16, 16] 73,984 0.63% ├─Sequential: 1-6 [1, 128, 8, 8] -- -- -│ └─BasicBlock: 2-3 [1, 128, 8, 8] 230,144 1.97% +│ ├─BasicBlock: 2-3 [1, 128, 8, 8] 230,144 1.97% │ └─BasicBlock: 2-4 [1, 128, 8, 8] 295,424 2.53% ├─Sequential: 1-7 [1, 256, 4, 4] -- -- -│ └─BasicBlock: 2-5 [1, 256, 4, 4] 919,040 7.86% +│ ├─BasicBlock: 2-5 [1, 256, 4, 4] 919,040 7.86% │ └─BasicBlock: 2-6 [1, 256, 4, 4] 1,180,672 10.10% ├─Sequential: 1-8 [1, 512, 2, 2] -- -- -│ └─BasicBlock: 2-7 [1, 512, 2, 2] 3,673,088 31.42% +│ ├─BasicBlock: 2-7 [1, 512, 2, 2] 3,673,088 31.42% │ └─BasicBlock: 2-8 [1, 512, 2, 2] 4,720,640 40.38% ├─AdaptiveAvgPool2d: 1-9 [1, 512, 1, 1] -- -- -├─Linear: 1-10 [1, 1000] 513,000 4.39% +└─Linear: 1-10 [1, 1000] 513,000 4.39% =================================================================================================================== Total params: 11,689,512 Trainable params: 11,689,512 diff --git a/tests/test_output/resnet50.out b/tests/test_output/resnet50.out index 73deafc..e6ba9d4 100644 --- a/tests/test_output/resnet50.out +++ b/tests/test_output/resnet50.out @@ -7,175 +7,175 @@ ResNet [2, 1000] -- ├─ReLU: 1-3 [2, 64, 112, 112] -- ├─MaxPool2d: 1-4 [2, 64, 56, 56] -- ├─Sequential: 1-5 [2, 256, 56, 56] -- -│ └─Bottleneck: 2-1 [2, 256, 56, 56] -- -│ │ └─Conv2d: 3-1 [2, 64, 56, 56] 4,096 -│ │ └─BatchNorm2d: 3-2 [2, 64, 56, 56] 128 -│ │ └─ReLU: 3-3 [2, 64, 56, 56] -- -│ │ └─Conv2d: 3-4 [2, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-5 [2, 64, 56, 56] 128 -│ │ └─ReLU: 3-6 [2, 64, 56, 56] -- -│ │ └─Conv2d: 3-7 [2, 256, 56, 56] 16,384 -│ │ └─BatchNorm2d: 3-8 [2, 256, 56, 56] 512 -│ │ └─Sequential: 3-9 [2, 256, 56, 56] 16,896 +│ ├─Bottleneck: 2-1 [2, 256, 56, 56] -- +│ │ ├─Conv2d: 3-1 [2, 64, 56, 56] 4,096 +│ │ ├─BatchNorm2d: 3-2 [2, 64, 56, 56] 128 +│ │ ├─ReLU: 3-3 [2, 64, 56, 56] -- +│ │ ├─Conv2d: 3-4 [2, 64, 56, 56] 36,864 +│ │ ├─BatchNorm2d: 3-5 [2, 64, 56, 56] 128 +│ │ ├─ReLU: 3-6 [2, 64, 56, 56] -- +│ │ ├─Conv2d: 3-7 [2, 256, 56, 56] 16,384 +│ │ ├─BatchNorm2d: 3-8 [2, 256, 56, 56] 512 +│ │ ├─Sequential: 3-9 [2, 256, 56, 56] 16,896 │ │ └─ReLU: 3-10 [2, 256, 56, 56] -- -│ └─Bottleneck: 2-2 [2, 256, 56, 56] -- -│ │ └─Conv2d: 3-11 [2, 64, 56, 56] 16,384 -│ │ └─BatchNorm2d: 3-12 [2, 64, 56, 56] 128 -│ │ └─ReLU: 3-13 [2, 64, 56, 56] -- -│ │ └─Conv2d: 3-14 [2, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-15 [2, 64, 56, 56] 128 -│ │ └─ReLU: 3-16 [2, 64, 56, 56] -- -│ │ └─Conv2d: 3-17 [2, 256, 56, 56] 16,384 -│ │ └─BatchNorm2d: 3-18 [2, 256, 56, 56] 512 +│ ├─Bottleneck: 2-2 [2, 256, 56, 56] -- +│ │ ├─Conv2d: 3-11 [2, 64, 56, 56] 16,384 +│ │ ├─BatchNorm2d: 3-12 [2, 64, 56, 56] 128 +│ │ ├─ReLU: 3-13 [2, 64, 56, 56] -- +│ │ ├─Conv2d: 3-14 [2, 64, 56, 56] 36,864 +│ │ ├─BatchNorm2d: 3-15 [2, 64, 56, 56] 128 +│ │ ├─ReLU: 3-16 [2, 64, 56, 56] -- +│ │ ├─Conv2d: 3-17 [2, 256, 56, 56] 16,384 +│ │ ├─BatchNorm2d: 3-18 [2, 256, 56, 56] 512 │ │ └─ReLU: 3-19 [2, 256, 56, 56] -- │ └─Bottleneck: 2-3 [2, 256, 56, 56] -- -│ │ └─Conv2d: 3-20 [2, 64, 56, 56] 16,384 -│ │ └─BatchNorm2d: 3-21 [2, 64, 56, 56] 128 -│ │ └─ReLU: 3-22 [2, 64, 56, 56] -- -│ │ └─Conv2d: 3-23 [2, 64, 56, 56] 36,864 -│ │ └─BatchNorm2d: 3-24 [2, 64, 56, 56] 128 -│ │ └─ReLU: 3-25 [2, 64, 56, 56] -- -│ │ └─Conv2d: 3-26 [2, 256, 56, 56] 16,384 -│ │ └─BatchNorm2d: 3-27 [2, 256, 56, 56] 512 -│ │ └─ReLU: 3-28 [2, 256, 56, 56] -- +│ ├─Conv2d: 3-20 [2, 64, 56, 56] 16,384 +│ ├─BatchNorm2d: 3-21 [2, 64, 56, 56] 128 +│ ├─ReLU: 3-22 [2, 64, 56, 56] -- +│ ├─Conv2d: 3-23 [2, 64, 56, 56] 36,864 +│ ├─BatchNorm2d: 3-24 [2, 64, 56, 56] 128 +│ ├─ReLU: 3-25 [2, 64, 56, 56] -- +│ ├─Conv2d: 3-26 [2, 256, 56, 56] 16,384 +│ ├─BatchNorm2d: 3-27 [2, 256, 56, 56] 512 +│ └─ReLU: 3-28 [2, 256, 56, 56] -- ├─Sequential: 1-6 [2, 512, 28, 28] -- -│ └─Bottleneck: 2-4 [2, 512, 28, 28] -- -│ │ └─Conv2d: 3-29 [2, 128, 56, 56] 32,768 -│ │ └─BatchNorm2d: 3-30 [2, 128, 56, 56] 256 -│ │ └─ReLU: 3-31 [2, 128, 56, 56] -- -│ │ └─Conv2d: 3-32 [2, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-33 [2, 128, 28, 28] 256 -│ │ └─ReLU: 3-34 [2, 128, 28, 28] -- -│ │ └─Conv2d: 3-35 [2, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-36 [2, 512, 28, 28] 1,024 -│ │ └─Sequential: 3-37 [2, 512, 28, 28] 132,096 +│ ├─Bottleneck: 2-4 [2, 512, 28, 28] -- +│ │ ├─Conv2d: 3-29 [2, 128, 56, 56] 32,768 +│ │ ├─BatchNorm2d: 3-30 [2, 128, 56, 56] 256 +│ │ ├─ReLU: 3-31 [2, 128, 56, 56] -- +│ │ ├─Conv2d: 3-32 [2, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-33 [2, 128, 28, 28] 256 +│ │ ├─ReLU: 3-34 [2, 128, 28, 28] -- +│ │ ├─Conv2d: 3-35 [2, 512, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-36 [2, 512, 28, 28] 1,024 +│ │ ├─Sequential: 3-37 [2, 512, 28, 28] 132,096 │ │ └─ReLU: 3-38 [2, 512, 28, 28] -- -│ └─Bottleneck: 2-5 [2, 512, 28, 28] -- -│ │ └─Conv2d: 3-39 [2, 128, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-40 [2, 128, 28, 28] 256 -│ │ └─ReLU: 3-41 [2, 128, 28, 28] -- -│ │ └─Conv2d: 3-42 [2, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-43 [2, 128, 28, 28] 256 -│ │ └─ReLU: 3-44 [2, 128, 28, 28] -- -│ │ └─Conv2d: 3-45 [2, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-46 [2, 512, 28, 28] 1,024 +│ ├─Bottleneck: 2-5 [2, 512, 28, 28] -- +│ │ ├─Conv2d: 3-39 [2, 128, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-40 [2, 128, 28, 28] 256 +│ │ ├─ReLU: 3-41 [2, 128, 28, 28] -- +│ │ ├─Conv2d: 3-42 [2, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-43 [2, 128, 28, 28] 256 +│ │ ├─ReLU: 3-44 [2, 128, 28, 28] -- +│ │ ├─Conv2d: 3-45 [2, 512, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-46 [2, 512, 28, 28] 1,024 │ │ └─ReLU: 3-47 [2, 512, 28, 28] -- -│ └─Bottleneck: 2-6 [2, 512, 28, 28] -- -│ │ └─Conv2d: 3-48 [2, 128, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-49 [2, 128, 28, 28] 256 -│ │ └─ReLU: 3-50 [2, 128, 28, 28] -- -│ │ └─Conv2d: 3-51 [2, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-52 [2, 128, 28, 28] 256 -│ │ └─ReLU: 3-53 [2, 128, 28, 28] -- -│ │ └─Conv2d: 3-54 [2, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-55 [2, 512, 28, 28] 1,024 +│ ├─Bottleneck: 2-6 [2, 512, 28, 28] -- +│ │ ├─Conv2d: 3-48 [2, 128, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-49 [2, 128, 28, 28] 256 +│ │ ├─ReLU: 3-50 [2, 128, 28, 28] -- +│ │ ├─Conv2d: 3-51 [2, 128, 28, 28] 147,456 +│ │ ├─BatchNorm2d: 3-52 [2, 128, 28, 28] 256 +│ │ ├─ReLU: 3-53 [2, 128, 28, 28] -- +│ │ ├─Conv2d: 3-54 [2, 512, 28, 28] 65,536 +│ │ ├─BatchNorm2d: 3-55 [2, 512, 28, 28] 1,024 │ │ └─ReLU: 3-56 [2, 512, 28, 28] -- │ └─Bottleneck: 2-7 [2, 512, 28, 28] -- -│ │ └─Conv2d: 3-57 [2, 128, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-58 [2, 128, 28, 28] 256 -│ │ └─ReLU: 3-59 [2, 128, 28, 28] -- -│ │ └─Conv2d: 3-60 [2, 128, 28, 28] 147,456 -│ │ └─BatchNorm2d: 3-61 [2, 128, 28, 28] 256 -│ │ └─ReLU: 3-62 [2, 128, 28, 28] -- -│ │ └─Conv2d: 3-63 [2, 512, 28, 28] 65,536 -│ │ └─BatchNorm2d: 3-64 [2, 512, 28, 28] 1,024 -│ │ └─ReLU: 3-65 [2, 512, 28, 28] -- +│ ├─Conv2d: 3-57 [2, 128, 28, 28] 65,536 +│ ├─BatchNorm2d: 3-58 [2, 128, 28, 28] 256 +│ ├─ReLU: 3-59 [2, 128, 28, 28] -- +│ ├─Conv2d: 3-60 [2, 128, 28, 28] 147,456 +│ ├─BatchNorm2d: 3-61 [2, 128, 28, 28] 256 +│ ├─ReLU: 3-62 [2, 128, 28, 28] -- +│ ├─Conv2d: 3-63 [2, 512, 28, 28] 65,536 +│ ├─BatchNorm2d: 3-64 [2, 512, 28, 28] 1,024 +│ └─ReLU: 3-65 [2, 512, 28, 28] -- ├─Sequential: 1-7 [2, 1024, 14, 14] -- -│ └─Bottleneck: 2-8 [2, 1024, 14, 14] -- -│ │ └─Conv2d: 3-66 [2, 256, 28, 28] 131,072 -│ │ └─BatchNorm2d: 3-67 [2, 256, 28, 28] 512 -│ │ └─ReLU: 3-68 [2, 256, 28, 28] -- -│ │ └─Conv2d: 3-69 [2, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-70 [2, 256, 14, 14] 512 -│ │ └─ReLU: 3-71 [2, 256, 14, 14] -- -│ │ └─Conv2d: 3-72 [2, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-73 [2, 1024, 14, 14] 2,048 -│ │ └─Sequential: 3-74 [2, 1024, 14, 14] 526,336 +│ ├─Bottleneck: 2-8 [2, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-66 [2, 256, 28, 28] 131,072 +│ │ ├─BatchNorm2d: 3-67 [2, 256, 28, 28] 512 +│ │ ├─ReLU: 3-68 [2, 256, 28, 28] -- +│ │ ├─Conv2d: 3-69 [2, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-70 [2, 256, 14, 14] 512 +│ │ ├─ReLU: 3-71 [2, 256, 14, 14] -- +│ │ ├─Conv2d: 3-72 [2, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-73 [2, 1024, 14, 14] 2,048 +│ │ ├─Sequential: 3-74 [2, 1024, 14, 14] 526,336 │ │ └─ReLU: 3-75 [2, 1024, 14, 14] -- -│ └─Bottleneck: 2-9 [2, 1024, 14, 14] -- -│ │ └─Conv2d: 3-76 [2, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-77 [2, 256, 14, 14] 512 -│ │ └─ReLU: 3-78 [2, 256, 14, 14] -- -│ │ └─Conv2d: 3-79 [2, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-80 [2, 256, 14, 14] 512 -│ │ └─ReLU: 3-81 [2, 256, 14, 14] -- -│ │ └─Conv2d: 3-82 [2, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-83 [2, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-9 [2, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-76 [2, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-77 [2, 256, 14, 14] 512 +│ │ ├─ReLU: 3-78 [2, 256, 14, 14] -- +│ │ ├─Conv2d: 3-79 [2, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-80 [2, 256, 14, 14] 512 +│ │ ├─ReLU: 3-81 [2, 256, 14, 14] -- +│ │ ├─Conv2d: 3-82 [2, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-83 [2, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-84 [2, 1024, 14, 14] -- -│ └─Bottleneck: 2-10 [2, 1024, 14, 14] -- -│ │ └─Conv2d: 3-85 [2, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-86 [2, 256, 14, 14] 512 -│ │ └─ReLU: 3-87 [2, 256, 14, 14] -- -│ │ └─Conv2d: 3-88 [2, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-89 [2, 256, 14, 14] 512 -│ │ └─ReLU: 3-90 [2, 256, 14, 14] -- -│ │ └─Conv2d: 3-91 [2, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-92 [2, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-10 [2, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-85 [2, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-86 [2, 256, 14, 14] 512 +│ │ ├─ReLU: 3-87 [2, 256, 14, 14] -- +│ │ ├─Conv2d: 3-88 [2, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-89 [2, 256, 14, 14] 512 +│ │ ├─ReLU: 3-90 [2, 256, 14, 14] -- +│ │ ├─Conv2d: 3-91 [2, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-92 [2, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-93 [2, 1024, 14, 14] -- -│ └─Bottleneck: 2-11 [2, 1024, 14, 14] -- -│ │ └─Conv2d: 3-94 [2, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-95 [2, 256, 14, 14] 512 -│ │ └─ReLU: 3-96 [2, 256, 14, 14] -- -│ │ └─Conv2d: 3-97 [2, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-98 [2, 256, 14, 14] 512 -│ │ └─ReLU: 3-99 [2, 256, 14, 14] -- -│ │ └─Conv2d: 3-100 [2, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-101 [2, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-11 [2, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-94 [2, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-95 [2, 256, 14, 14] 512 +│ │ ├─ReLU: 3-96 [2, 256, 14, 14] -- +│ │ ├─Conv2d: 3-97 [2, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-98 [2, 256, 14, 14] 512 +│ │ ├─ReLU: 3-99 [2, 256, 14, 14] -- +│ │ ├─Conv2d: 3-100 [2, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-101 [2, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-102 [2, 1024, 14, 14] -- -│ └─Bottleneck: 2-12 [2, 1024, 14, 14] -- -│ │ └─Conv2d: 3-103 [2, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-104 [2, 256, 14, 14] 512 -│ │ └─ReLU: 3-105 [2, 256, 14, 14] -- -│ │ └─Conv2d: 3-106 [2, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-107 [2, 256, 14, 14] 512 -│ │ └─ReLU: 3-108 [2, 256, 14, 14] -- -│ │ └─Conv2d: 3-109 [2, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-110 [2, 1024, 14, 14] 2,048 +│ ├─Bottleneck: 2-12 [2, 1024, 14, 14] -- +│ │ ├─Conv2d: 3-103 [2, 256, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-104 [2, 256, 14, 14] 512 +│ │ ├─ReLU: 3-105 [2, 256, 14, 14] -- +│ │ ├─Conv2d: 3-106 [2, 256, 14, 14] 589,824 +│ │ ├─BatchNorm2d: 3-107 [2, 256, 14, 14] 512 +│ │ ├─ReLU: 3-108 [2, 256, 14, 14] -- +│ │ ├─Conv2d: 3-109 [2, 1024, 14, 14] 262,144 +│ │ ├─BatchNorm2d: 3-110 [2, 1024, 14, 14] 2,048 │ │ └─ReLU: 3-111 [2, 1024, 14, 14] -- │ └─Bottleneck: 2-13 [2, 1024, 14, 14] -- -│ │ └─Conv2d: 3-112 [2, 256, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-113 [2, 256, 14, 14] 512 -│ │ └─ReLU: 3-114 [2, 256, 14, 14] -- -│ │ └─Conv2d: 3-115 [2, 256, 14, 14] 589,824 -│ │ └─BatchNorm2d: 3-116 [2, 256, 14, 14] 512 -│ │ └─ReLU: 3-117 [2, 256, 14, 14] -- -│ │ └─Conv2d: 3-118 [2, 1024, 14, 14] 262,144 -│ │ └─BatchNorm2d: 3-119 [2, 1024, 14, 14] 2,048 -│ │ └─ReLU: 3-120 [2, 1024, 14, 14] -- +│ ├─Conv2d: 3-112 [2, 256, 14, 14] 262,144 +│ ├─BatchNorm2d: 3-113 [2, 256, 14, 14] 512 +│ ├─ReLU: 3-114 [2, 256, 14, 14] -- +│ ├─Conv2d: 3-115 [2, 256, 14, 14] 589,824 +│ ├─BatchNorm2d: 3-116 [2, 256, 14, 14] 512 +│ ├─ReLU: 3-117 [2, 256, 14, 14] -- +│ ├─Conv2d: 3-118 [2, 1024, 14, 14] 262,144 +│ ├─BatchNorm2d: 3-119 [2, 1024, 14, 14] 2,048 +│ └─ReLU: 3-120 [2, 1024, 14, 14] -- ├─Sequential: 1-8 [2, 2048, 7, 7] -- -│ └─Bottleneck: 2-14 [2, 2048, 7, 7] -- -│ │ └─Conv2d: 3-121 [2, 512, 14, 14] 524,288 -│ │ └─BatchNorm2d: 3-122 [2, 512, 14, 14] 1,024 -│ │ └─ReLU: 3-123 [2, 512, 14, 14] -- -│ │ └─Conv2d: 3-124 [2, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-125 [2, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-126 [2, 512, 7, 7] -- -│ │ └─Conv2d: 3-127 [2, 2048, 7, 7] 1,048,576 -│ │ └─BatchNorm2d: 3-128 [2, 2048, 7, 7] 4,096 -│ │ └─Sequential: 3-129 [2, 2048, 7, 7] 2,101,248 +│ ├─Bottleneck: 2-14 [2, 2048, 7, 7] -- +│ │ ├─Conv2d: 3-121 [2, 512, 14, 14] 524,288 +│ │ ├─BatchNorm2d: 3-122 [2, 512, 14, 14] 1,024 +│ │ ├─ReLU: 3-123 [2, 512, 14, 14] -- +│ │ ├─Conv2d: 3-124 [2, 512, 7, 7] 2,359,296 +│ │ ├─BatchNorm2d: 3-125 [2, 512, 7, 7] 1,024 +│ │ ├─ReLU: 3-126 [2, 512, 7, 7] -- +│ │ ├─Conv2d: 3-127 [2, 2048, 7, 7] 1,048,576 +│ │ ├─BatchNorm2d: 3-128 [2, 2048, 7, 7] 4,096 +│ │ ├─Sequential: 3-129 [2, 2048, 7, 7] 2,101,248 │ │ └─ReLU: 3-130 [2, 2048, 7, 7] -- -│ └─Bottleneck: 2-15 [2, 2048, 7, 7] -- -│ │ └─Conv2d: 3-131 [2, 512, 7, 7] 1,048,576 -│ │ └─BatchNorm2d: 3-132 [2, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-133 [2, 512, 7, 7] -- -│ │ └─Conv2d: 3-134 [2, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-135 [2, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-136 [2, 512, 7, 7] -- -│ │ └─Conv2d: 3-137 [2, 2048, 7, 7] 1,048,576 -│ │ └─BatchNorm2d: 3-138 [2, 2048, 7, 7] 4,096 +│ ├─Bottleneck: 2-15 [2, 2048, 7, 7] -- +│ │ ├─Conv2d: 3-131 [2, 512, 7, 7] 1,048,576 +│ │ ├─BatchNorm2d: 3-132 [2, 512, 7, 7] 1,024 +│ │ ├─ReLU: 3-133 [2, 512, 7, 7] -- +│ │ ├─Conv2d: 3-134 [2, 512, 7, 7] 2,359,296 +│ │ ├─BatchNorm2d: 3-135 [2, 512, 7, 7] 1,024 +│ │ ├─ReLU: 3-136 [2, 512, 7, 7] -- +│ │ ├─Conv2d: 3-137 [2, 2048, 7, 7] 1,048,576 +│ │ ├─BatchNorm2d: 3-138 [2, 2048, 7, 7] 4,096 │ │ └─ReLU: 3-139 [2, 2048, 7, 7] -- │ └─Bottleneck: 2-16 [2, 2048, 7, 7] -- -│ │ └─Conv2d: 3-140 [2, 512, 7, 7] 1,048,576 -│ │ └─BatchNorm2d: 3-141 [2, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-142 [2, 512, 7, 7] -- -│ │ └─Conv2d: 3-143 [2, 512, 7, 7] 2,359,296 -│ │ └─BatchNorm2d: 3-144 [2, 512, 7, 7] 1,024 -│ │ └─ReLU: 3-145 [2, 512, 7, 7] -- -│ │ └─Conv2d: 3-146 [2, 2048, 7, 7] 1,048,576 -│ │ └─BatchNorm2d: 3-147 [2, 2048, 7, 7] 4,096 -│ │ └─ReLU: 3-148 [2, 2048, 7, 7] -- +│ ├─Conv2d: 3-140 [2, 512, 7, 7] 1,048,576 +│ ├─BatchNorm2d: 3-141 [2, 512, 7, 7] 1,024 +│ ├─ReLU: 3-142 [2, 512, 7, 7] -- +│ ├─Conv2d: 3-143 [2, 512, 7, 7] 2,359,296 +│ ├─BatchNorm2d: 3-144 [2, 512, 7, 7] 1,024 +│ ├─ReLU: 3-145 [2, 512, 7, 7] -- +│ ├─Conv2d: 3-146 [2, 2048, 7, 7] 1,048,576 +│ ├─BatchNorm2d: 3-147 [2, 2048, 7, 7] 4,096 +│ └─ReLU: 3-148 [2, 2048, 7, 7] -- ├─AdaptiveAvgPool2d: 1-9 [2, 2048, 1, 1] -- -├─Linear: 1-10 [2, 1000] 2,049,000 +└─Linear: 1-10 [2, 1000] 2,049,000 ========================================================================================== Total params: 25,557,032 Trainable params: 25,557,032 diff --git a/tests/test_output/return_dict.out b/tests/test_output/return_dict.out index 294ef14..c6be5c9 100644 --- a/tests/test_output/return_dict.out +++ b/tests/test_output/return_dict.out @@ -2,11 +2,11 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================================================================================================== ReturnDict [[1, 10]] -- -├─ReturnDictLayer: 1-1 [[1, 10]] -- -│ └─Conv2d: 2-1 [1, 10, 24, 24] 260 -│ └─Conv2d: 2-2 [1, 20, 8, 8] 5,020 -│ └─Linear: 2-3 [1, 50] 16,050 -│ └─Linear: 2-4 [1, 10] 510 +└─ReturnDictLayer: 1-1 [[1, 10]] -- + ├─Conv2d: 2-1 [1, 10, 24, 24] 260 + ├─Conv2d: 2-2 [1, 20, 8, 8] 5,020 + ├─Linear: 2-3 [1, 50] 16,050 + └─Linear: 2-4 [1, 10] 510 ========================================================================================================================================================================== Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/reusing_activation_layers.out b/tests/test_output/reusing_activation_layers.out index 754cc45..693dc9f 100644 --- a/tests/test_output/reusing_activation_layers.out +++ b/tests/test_output/reusing_activation_layers.out @@ -6,7 +6,7 @@ Sequential -- ├─Identity: 1-2 -- ├─LeakyReLU: 1-3 -- ├─Identity: 1-4 -- -├─LeakyReLU: 1-5 -- +└─LeakyReLU: 1-5 -- ================================================================= Total params: 0 Trainable params: 0 @@ -20,7 +20,7 @@ Sequential -- ├─Identity: 1-2 -- ├─LeakyReLU: 1-3 -- ├─Identity: 1-4 -- -├─LeakyReLU: 1-5 -- +└─LeakyReLU: 1-5 -- ================================================================= Total params: 0 Trainable params: 0 diff --git a/tests/test_output/row_settings.out b/tests/test_output/row_settings.out index 46e4a91..d757cb1 100644 --- a/tests/test_output/row_settings.out +++ b/tests/test_output/row_settings.out @@ -6,7 +6,7 @@ SingleInputNet (SingleInputNet) [16, 10] -- ├─Conv2d (conv2) [16, 20, 8, 8] 5,020 ├─Dropout2d (conv2_drop) [16, 20, 8, 8] -- ├─Linear (fc1) [16, 50] 16,050 -├─Linear (fc2) [16, 10] 510 +└─Linear (fc2) [16, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/siamese_net.out b/tests/test_output/siamese_net.out index e74142d..640e910 100644 --- a/tests/test_output/siamese_net.out +++ b/tests/test_output/siamese_net.out @@ -21,7 +21,7 @@ SiameseNets [1, 1] -- ├─Linear: 1-17 [1, 4096] 1,052,672 ├─Linear: 1-18 [1, 4096] (recursive) ├─Dropout: 1-19 [1, 4096] -- -├─Linear: 1-20 [1, 1] 4,097 +└─Linear: 1-20 [1, 1] 4,097 ========================================================================================== Total params: 2,251,585 Trainable params: 2,251,585 diff --git a/tests/test_output/single_input.out b/tests/test_output/single_input.out index 04f8b3a..c2370bf 100644 --- a/tests/test_output/single_input.out +++ b/tests/test_output/single_input.out @@ -6,7 +6,7 @@ SingleInputNet [2, 10] -- ├─Conv2d: 1-2 [2, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [2, 20, 8, 8] -- ├─Linear: 1-4 [2, 50] 16,050 -├─Linear: 1-5 [2, 10] 510 +└─Linear: 1-5 [2, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/single_input_all_cols.out b/tests/test_output/single_input_all_cols.out index a3b096b..4350922 100644 --- a/tests/test_output/single_input_all_cols.out +++ b/tests/test_output/single_input_all_cols.out @@ -6,7 +6,7 @@ SingleInputNet -- [7, 1, 28, 28] ├─Conv2d: 1-2 [5, 5] [7, 10, 12, 12] [7, 20, 8, 8] 5,020 22.99% 2,248,960 True ├─Dropout2d: 1-3 -- [7, 20, 8, 8] [7, 20, 8, 8] -- -- -- -- ├─Linear: 1-4 -- [7, 320] [7, 50] 16,050 73.49% 112,350 True -├─Linear: 1-5 -- [7, 50] [7, 10] 510 2.34% 3,570 True +└─Linear: 1-5 -- [7, 50] [7, 10] 510 2.34% 3,570 True ==================================================================================================================================================================================== Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/single_input_batch_dim.out b/tests/test_output/single_input_batch_dim.out index 281cd51..f0eb759 100644 --- a/tests/test_output/single_input_batch_dim.out +++ b/tests/test_output/single_input_batch_dim.out @@ -6,7 +6,7 @@ SingleInputNet -- [1, 1, 28, 28] ├─Conv2d: 1-2 [5, 5] [1, 10, 12, 12] [1, 20, 8, 8] 5,020 321,280 ├─Dropout2d: 1-3 -- [1, 20, 8, 8] [1, 20, 8, 8] -- -- ├─Linear: 1-4 -- [1, 320] [1, 50] 16,050 16,050 -├─Linear: 1-5 -- [1, 50] [1, 10] 510 510 +└─Linear: 1-5 -- [1, 50] [1, 10] 510 510 ============================================================================================================================================ Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/single_input_half.out b/tests/test_output/single_input_half.out index 96d4320..abd1c29 100644 --- a/tests/test_output/single_input_half.out +++ b/tests/test_output/single_input_half.out @@ -6,7 +6,7 @@ SingleInputNet [2, 10] -- ├─Conv2d: 1-2 [2, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [2, 20, 8, 8] -- ├─Linear: 1-4 [2, 50] 16,050 -├─Linear: 1-5 [2, 10] 510 +└─Linear: 1-5 [2, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/single_parameter_model.out b/tests/test_output/single_parameter_model.out index 913a851..c3f306d 100644 --- a/tests/test_output/single_parameter_model.out +++ b/tests/test_output/single_parameter_model.out @@ -11,7 +11,7 @@ Non-trainable params: 0 Layer (type:depth-idx) Param # ================================================================= ParameterB 1,024 -├─Conv2d: 1-1 168 +└─Conv2d: 1-1 168 ================================================================= Total params: 1,192 Trainable params: 1,192 @@ -21,7 +21,7 @@ Non-trainable params: 0 Layer (type:depth-idx) Param # ================================================================= ParameterA 1,024 -├─w └─1,024 +└─w └─1,024 ================================================================= Total params: 1,024 Trainable params: 1,024 @@ -32,9 +32,9 @@ Layer (type:depth-idx) Param # ================================================================= ParameterB 1,024 ├─w └─1,024 -├─Conv2d: 1-1 168 -│ └─weight ├─162 -│ └─bias └─6 +└─Conv2d: 1-1 168 + ├─weight ├─162 + └─bias └─6 ================================================================= Total params: 1,192 Trainable params: 1,192 diff --git a/tests/test_output/string_result.out b/tests/test_output/string_result.out index 5a75564..fa040f2 100644 --- a/tests/test_output/string_result.out +++ b/tests/test_output/string_result.out @@ -6,7 +6,7 @@ SingleInputNet [16, 10] -- ├─Conv2d: 1-2 [16, 20, 8, 8] 5,020 ├─Dropout2d: 1-3 [16, 20, 8, 8] -- ├─Linear: 1-4 [16, 50] 16,050 -├─Linear: 1-5 [16, 10] 510 +└─Linear: 1-5 [16, 10] 510 ========================================================================================== Total params: 21,840 Trainable params: 21,840 diff --git a/tests/test_output/tmva_net_column_totals.out b/tests/test_output/tmva_net_column_totals.out index c8236e6..26a0c7f 100644 --- a/tests/test_output/tmva_net_column_totals.out +++ b/tests/test_output/tmva_net_column_totals.out @@ -3,7 +3,7 @@ Layer (type:depth-idx) Output Shape Param # ======================================================================================================================== TMVANet [1, 4, 256, 64] -- -- ├─TMVANet_Encoder: 1-1 [1, 384, 64, 64] 3,954,432 61,285,604,864 -├─TMVANet_Decoder: 1-2 [1, 4, 256, 64] 1,676,552 40,752,187,904 +└─TMVANet_Decoder: 1-2 [1, 4, 256, 64] 1,676,552 40,752,187,904 ======================================================================================================================== Total params: 5,630,984 Trainable params: 5,630,984 @@ -20,70 +20,70 @@ Layer (type:depth-idx) Output Shape Param # ======================================================================================================================== TMVANet [1, 4, 256, 64] -- -- ├─TMVANet_Encoder: 1-1 [1, 384, 64, 64] -- -- -│ └─EncodingBranch: 2-1 [1, 128, 64, 64] -- -- -│ │ └─Double3DConvBlock: 3-1 [1, 128, 1, 256, 256] 446,592 29,704,061,440 -│ │ └─MaxPool2d: 3-2 [1, 128, 128, 128] -- -- -│ │ └─DoubleConvBlock: 3-3 [1, 128, 128, 128] 295,680 4,836,033,024 -│ │ └─MaxPool2d: 3-4 [1, 128, 64, 64] -- -- +│ ├─EncodingBranch: 2-1 [1, 128, 64, 64] -- -- +│ │ ├─Double3DConvBlock: 3-1 [1, 128, 1, 256, 256] 446,592 29,704,061,440 +│ │ ├─MaxPool2d: 3-2 [1, 128, 128, 128] -- -- +│ │ ├─DoubleConvBlock: 3-3 [1, 128, 128, 128] 295,680 4,836,033,024 +│ │ ├─MaxPool2d: 3-4 [1, 128, 64, 64] -- -- │ │ └─ConvBlock: 3-5 [1, 128, 64, 64] 16,768 67,633,408 -│ └─EncodingBranch: 2-2 [1, 128, 64, 64] -- -- -│ │ └─Double3DConvBlock: 3-6 [1, 128, 1, 256, 64] 446,592 7,426,015,744 -│ │ └─MaxPool2d: 3-7 [1, 128, 128, 64] -- -- -│ │ └─DoubleConvBlock: 3-8 [1, 128, 128, 64] 295,680 2,418,016,768 -│ │ └─MaxPool2d: 3-9 [1, 128, 64, 64] -- -- +│ ├─EncodingBranch: 2-2 [1, 128, 64, 64] -- -- +│ │ ├─Double3DConvBlock: 3-6 [1, 128, 1, 256, 64] 446,592 7,426,015,744 +│ │ ├─MaxPool2d: 3-7 [1, 128, 128, 64] -- -- +│ │ ├─DoubleConvBlock: 3-8 [1, 128, 128, 64] 295,680 2,418,016,768 +│ │ ├─MaxPool2d: 3-9 [1, 128, 64, 64] -- -- │ │ └─ConvBlock: 3-10 [1, 128, 64, 64] 16,768 67,633,408 -│ └─EncodingBranch: 2-3 [1, 128, 64, 64] -- -- -│ │ └─Double3DConvBlock: 3-11 [1, 128, 1, 256, 64] 446,592 7,426,015,744 -│ │ └─MaxPool2d: 3-12 [1, 128, 128, 64] -- -- -│ │ └─DoubleConvBlock: 3-13 [1, 128, 128, 64] 295,680 2,418,016,768 -│ │ └─MaxPool2d: 3-14 [1, 128, 64, 64] -- -- +│ ├─EncodingBranch: 2-3 [1, 128, 64, 64] -- -- +│ │ ├─Double3DConvBlock: 3-11 [1, 128, 1, 256, 64] 446,592 7,426,015,744 +│ │ ├─MaxPool2d: 3-12 [1, 128, 128, 64] -- -- +│ │ ├─DoubleConvBlock: 3-13 [1, 128, 128, 64] 295,680 2,418,016,768 +│ │ ├─MaxPool2d: 3-14 [1, 128, 64, 64] -- -- │ │ └─ConvBlock: 3-15 [1, 128, 64, 64] 16,768 67,633,408 -│ └─ASPPBlock: 2-4 [1, 640, 64, 64] -- -- -│ │ └─AvgPool2d: 3-16 [1, 128, 1, 1] -- -- -│ │ └─Conv2d: 3-17 [1, 128, 64, 64] 16,512 67,633,152 -│ │ └─ConvBlock: 3-18 [1, 128, 64, 64] 16,768 67,633,408 -│ │ └─ConvBlock: 3-19 [1, 128, 64, 64] 147,840 604,504,320 -│ │ └─ConvBlock: 3-20 [1, 128, 64, 64] 147,840 604,504,320 +│ ├─ASPPBlock: 2-4 [1, 640, 64, 64] -- -- +│ │ ├─AvgPool2d: 3-16 [1, 128, 1, 1] -- -- +│ │ ├─Conv2d: 3-17 [1, 128, 64, 64] 16,512 67,633,152 +│ │ ├─ConvBlock: 3-18 [1, 128, 64, 64] 16,768 67,633,408 +│ │ ├─ConvBlock: 3-19 [1, 128, 64, 64] 147,840 604,504,320 +│ │ ├─ConvBlock: 3-20 [1, 128, 64, 64] 147,840 604,504,320 │ │ └─ConvBlock: 3-21 [1, 128, 64, 64] 147,840 604,504,320 -│ └─ASPPBlock: 2-5 [1, 640, 64, 64] -- -- -│ │ └─AvgPool2d: 3-22 [1, 128, 1, 1] -- -- -│ │ └─Conv2d: 3-23 [1, 128, 64, 64] 16,512 67,633,152 -│ │ └─ConvBlock: 3-24 [1, 128, 64, 64] 16,768 67,633,408 -│ │ └─ConvBlock: 3-25 [1, 128, 64, 64] 147,840 604,504,320 -│ │ └─ConvBlock: 3-26 [1, 128, 64, 64] 147,840 604,504,320 +│ ├─ASPPBlock: 2-5 [1, 640, 64, 64] -- -- +│ │ ├─AvgPool2d: 3-22 [1, 128, 1, 1] -- -- +│ │ ├─Conv2d: 3-23 [1, 128, 64, 64] 16,512 67,633,152 +│ │ ├─ConvBlock: 3-24 [1, 128, 64, 64] 16,768 67,633,408 +│ │ ├─ConvBlock: 3-25 [1, 128, 64, 64] 147,840 604,504,320 +│ │ ├─ConvBlock: 3-26 [1, 128, 64, 64] 147,840 604,504,320 │ │ └─ConvBlock: 3-27 [1, 128, 64, 64] 147,840 604,504,320 -│ └─ASPPBlock: 2-6 [1, 640, 64, 64] -- -- -│ │ └─AvgPool2d: 3-28 [1, 128, 1, 1] -- -- -│ │ └─Conv2d: 3-29 [1, 128, 64, 64] 16,512 67,633,152 -│ │ └─ConvBlock: 3-30 [1, 128, 64, 64] 16,768 67,633,408 -│ │ └─ConvBlock: 3-31 [1, 128, 64, 64] 147,840 604,504,320 -│ │ └─ConvBlock: 3-32 [1, 128, 64, 64] 147,840 604,504,320 +│ ├─ASPPBlock: 2-6 [1, 640, 64, 64] -- -- +│ │ ├─AvgPool2d: 3-28 [1, 128, 1, 1] -- -- +│ │ ├─Conv2d: 3-29 [1, 128, 64, 64] 16,512 67,633,152 +│ │ ├─ConvBlock: 3-30 [1, 128, 64, 64] 16,768 67,633,408 +│ │ ├─ConvBlock: 3-31 [1, 128, 64, 64] 147,840 604,504,320 +│ │ ├─ConvBlock: 3-32 [1, 128, 64, 64] 147,840 604,504,320 │ │ └─ConvBlock: 3-33 [1, 128, 64, 64] 147,840 604,504,320 -│ └─ConvBlock: 2-7 [1, 128, 64, 64] -- -- +│ ├─ConvBlock: 2-7 [1, 128, 64, 64] -- -- │ │ └─Sequential: 3-34 [1, 128, 64, 64] 82,304 336,068,864 -│ └─ConvBlock: 2-8 [1, 128, 64, 64] -- -- +│ ├─ConvBlock: 2-8 [1, 128, 64, 64] -- -- │ │ └─Sequential: 3-35 [1, 128, 64, 64] 82,304 336,068,864 │ └─ConvBlock: 2-9 [1, 128, 64, 64] -- -- -│ │ └─Sequential: 3-36 [1, 128, 64, 64] 82,304 336,068,864 -├─TMVANet_Decoder: 1-2 [1, 4, 256, 64] -- -- -│ └─ConvBlock: 2-10 [1, 128, 64, 64] -- -- -│ │ └─Sequential: 3-37 [1, 128, 64, 64] 49,536 201,851,136 -│ └─ConvBlock: 2-11 [1, 128, 64, 64] -- -- -│ │ └─Sequential: 3-38 [1, 128, 64, 64] 49,536 201,851,136 -│ └─ConvTranspose2d: 2-12 [1, 128, 128, 64] 98,432 806,354,944 -│ └─ConvTranspose2d: 2-13 [1, 128, 128, 128] 196,736 3,223,322,624 -│ └─DoubleConvBlock: 2-14 [1, 128, 128, 64] -- -- -│ │ └─Sequential: 3-39 [1, 128, 128, 64] 295,680 2,418,016,768 -│ └─DoubleConvBlock: 2-15 [1, 128, 128, 128] -- -- -│ │ └─Sequential: 3-40 [1, 128, 128, 128] 295,680 4,836,033,024 -│ └─ConvTranspose2d: 2-16 [1, 128, 256, 64] 32,896 538,968,064 -│ └─ConvTranspose2d: 2-17 [1, 128, 256, 256] 65,664 4,303,355,904 -│ └─DoubleConvBlock: 2-18 [1, 128, 256, 64] -- -- -│ │ └─Sequential: 3-41 [1, 128, 256, 64] 295,680 4,836,033,024 -│ └─DoubleConvBlock: 2-19 [1, 128, 256, 256] -- -- -│ │ └─Sequential: 3-42 [1, 128, 256, 256] 295,680 19,344,130,560 -│ └─Conv2d: 2-20 [1, 4, 256, 64] 516 8,454,144 -│ └─Conv2d: 2-21 [1, 4, 256, 256] 516 33,816,576 +│ └─Sequential: 3-36 [1, 128, 64, 64] 82,304 336,068,864 +└─TMVANet_Decoder: 1-2 [1, 4, 256, 64] -- -- + ├─ConvBlock: 2-10 [1, 128, 64, 64] -- -- + │ └─Sequential: 3-37 [1, 128, 64, 64] 49,536 201,851,136 + ├─ConvBlock: 2-11 [1, 128, 64, 64] -- -- + │ └─Sequential: 3-38 [1, 128, 64, 64] 49,536 201,851,136 + ├─ConvTranspose2d: 2-12 [1, 128, 128, 64] 98,432 806,354,944 + ├─ConvTranspose2d: 2-13 [1, 128, 128, 128] 196,736 3,223,322,624 + ├─DoubleConvBlock: 2-14 [1, 128, 128, 64] -- -- + │ └─Sequential: 3-39 [1, 128, 128, 64] 295,680 2,418,016,768 + ├─DoubleConvBlock: 2-15 [1, 128, 128, 128] -- -- + │ └─Sequential: 3-40 [1, 128, 128, 128] 295,680 4,836,033,024 + ├─ConvTranspose2d: 2-16 [1, 128, 256, 64] 32,896 538,968,064 + ├─ConvTranspose2d: 2-17 [1, 128, 256, 256] 65,664 4,303,355,904 + ├─DoubleConvBlock: 2-18 [1, 128, 256, 64] -- -- + │ └─Sequential: 3-41 [1, 128, 256, 64] 295,680 4,836,033,024 + ├─DoubleConvBlock: 2-19 [1, 128, 256, 256] -- -- + │ └─Sequential: 3-42 [1, 128, 256, 256] 295,680 19,344,130,560 + ├─Conv2d: 2-20 [1, 4, 256, 64] 516 8,454,144 + └─Conv2d: 2-21 [1, 4, 256, 256] 516 33,816,576 ======================================================================================================================== Total params: 5,630,984 Trainable params: 5,630,984 @@ -100,211 +100,211 @@ Layer (type:depth-idx) Output Shape Param # ======================================================================================================================== TMVANet [1, 4, 256, 64] -- -- ├─TMVANet_Encoder: 1-1 [1, 384, 64, 64] -- -- -│ └─EncodingBranch: 2-1 [1, 128, 64, 64] -- -- -│ │ └─Double3DConvBlock: 3-1 [1, 128, 1, 256, 256] -- -- +│ ├─EncodingBranch: 2-1 [1, 128, 64, 64] -- -- +│ │ ├─Double3DConvBlock: 3-1 [1, 128, 1, 256, 256] -- -- │ │ │ └─Sequential: 4-1 [1, 128, 1, 256, 256] -- -- -│ │ │ │ └─Conv3d: 5-1 [1, 128, 3, 256, 256] 3,584 704,643,072 -│ │ │ │ └─BatchNorm3d: 5-2 [1, 128, 3, 256, 256] 256 256 -│ │ │ │ └─LeakyReLU: 5-3 [1, 128, 3, 256, 256] -- -- -│ │ │ │ └─Conv3d: 5-4 [1, 128, 1, 256, 256] 442,496 28,999,417,856 -│ │ │ │ └─BatchNorm3d: 5-5 [1, 128, 1, 256, 256] 256 256 -│ │ │ │ └─LeakyReLU: 5-6 [1, 128, 1, 256, 256] -- -- -│ │ └─MaxPool2d: 3-2 [1, 128, 128, 128] -- -- -│ │ └─DoubleConvBlock: 3-3 [1, 128, 128, 128] -- -- +│ │ │ ├─Conv3d: 5-1 [1, 128, 3, 256, 256] 3,584 704,643,072 +│ │ │ ├─BatchNorm3d: 5-2 [1, 128, 3, 256, 256] 256 256 +│ │ │ ├─LeakyReLU: 5-3 [1, 128, 3, 256, 256] -- -- +│ │ │ ├─Conv3d: 5-4 [1, 128, 1, 256, 256] 442,496 28,999,417,856 +│ │ │ ├─BatchNorm3d: 5-5 [1, 128, 1, 256, 256] 256 256 +│ │ │ └─LeakyReLU: 5-6 [1, 128, 1, 256, 256] -- -- +│ │ ├─MaxPool2d: 3-2 [1, 128, 128, 128] -- -- +│ │ ├─DoubleConvBlock: 3-3 [1, 128, 128, 128] -- -- │ │ │ └─Sequential: 4-2 [1, 128, 128, 128] -- -- -│ │ │ │ └─Conv2d: 5-7 [1, 128, 128, 128] 147,584 2,418,016,256 -│ │ │ │ └─BatchNorm2d: 5-8 [1, 128, 128, 128] 256 256 -│ │ │ │ └─LeakyReLU: 5-9 [1, 128, 128, 128] -- -- -│ │ │ │ └─Conv2d: 5-10 [1, 128, 128, 128] 147,584 2,418,016,256 -│ │ │ │ └─BatchNorm2d: 5-11 [1, 128, 128, 128] 256 256 -│ │ │ │ └─LeakyReLU: 5-12 [1, 128, 128, 128] -- -- -│ │ └─MaxPool2d: 3-4 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-7 [1, 128, 128, 128] 147,584 2,418,016,256 +│ │ │ ├─BatchNorm2d: 5-8 [1, 128, 128, 128] 256 256 +│ │ │ ├─LeakyReLU: 5-9 [1, 128, 128, 128] -- -- +│ │ │ ├─Conv2d: 5-10 [1, 128, 128, 128] 147,584 2,418,016,256 +│ │ │ ├─BatchNorm2d: 5-11 [1, 128, 128, 128] 256 256 +│ │ │ └─LeakyReLU: 5-12 [1, 128, 128, 128] -- -- +│ │ ├─MaxPool2d: 3-4 [1, 128, 64, 64] -- -- │ │ └─ConvBlock: 3-5 [1, 128, 64, 64] -- -- -│ │ │ └─Sequential: 4-3 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-13 [1, 128, 64, 64] 16,512 67,633,152 -│ │ │ │ └─BatchNorm2d: 5-14 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-15 [1, 128, 64, 64] -- -- -│ └─EncodingBranch: 2-2 [1, 128, 64, 64] -- -- -│ │ └─Double3DConvBlock: 3-6 [1, 128, 1, 256, 64] -- -- +│ │ └─Sequential: 4-3 [1, 128, 64, 64] -- -- +│ │ ├─Conv2d: 5-13 [1, 128, 64, 64] 16,512 67,633,152 +│ │ ├─BatchNorm2d: 5-14 [1, 128, 64, 64] 256 256 +│ │ └─LeakyReLU: 5-15 [1, 128, 64, 64] -- -- +│ ├─EncodingBranch: 2-2 [1, 128, 64, 64] -- -- +│ │ ├─Double3DConvBlock: 3-6 [1, 128, 1, 256, 64] -- -- │ │ │ └─Sequential: 4-4 [1, 128, 1, 256, 64] -- -- -│ │ │ │ └─Conv3d: 5-16 [1, 128, 3, 256, 64] 3,584 176,160,768 -│ │ │ │ └─BatchNorm3d: 5-17 [1, 128, 3, 256, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-18 [1, 128, 3, 256, 64] -- -- -│ │ │ │ └─Conv3d: 5-19 [1, 128, 1, 256, 64] 442,496 7,249,854,464 -│ │ │ │ └─BatchNorm3d: 5-20 [1, 128, 1, 256, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-21 [1, 128, 1, 256, 64] -- -- -│ │ └─MaxPool2d: 3-7 [1, 128, 128, 64] -- -- -│ │ └─DoubleConvBlock: 3-8 [1, 128, 128, 64] -- -- +│ │ │ ├─Conv3d: 5-16 [1, 128, 3, 256, 64] 3,584 176,160,768 +│ │ │ ├─BatchNorm3d: 5-17 [1, 128, 3, 256, 64] 256 256 +│ │ │ ├─LeakyReLU: 5-18 [1, 128, 3, 256, 64] -- -- +│ │ │ ├─Conv3d: 5-19 [1, 128, 1, 256, 64] 442,496 7,249,854,464 +│ │ │ ├─BatchNorm3d: 5-20 [1, 128, 1, 256, 64] 256 256 +│ │ │ └─LeakyReLU: 5-21 [1, 128, 1, 256, 64] -- -- +│ │ ├─MaxPool2d: 3-7 [1, 128, 128, 64] -- -- +│ │ ├─DoubleConvBlock: 3-8 [1, 128, 128, 64] -- -- │ │ │ └─Sequential: 4-5 [1, 128, 128, 64] -- -- -│ │ │ │ └─Conv2d: 5-22 [1, 128, 128, 64] 147,584 1,209,008,128 -│ │ │ │ └─BatchNorm2d: 5-23 [1, 128, 128, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-24 [1, 128, 128, 64] -- -- -│ │ │ │ └─Conv2d: 5-25 [1, 128, 128, 64] 147,584 1,209,008,128 -│ │ │ │ └─BatchNorm2d: 5-26 [1, 128, 128, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-27 [1, 128, 128, 64] -- -- -│ │ └─MaxPool2d: 3-9 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-22 [1, 128, 128, 64] 147,584 1,209,008,128 +│ │ │ ├─BatchNorm2d: 5-23 [1, 128, 128, 64] 256 256 +│ │ │ ├─LeakyReLU: 5-24 [1, 128, 128, 64] -- -- +│ │ │ ├─Conv2d: 5-25 [1, 128, 128, 64] 147,584 1,209,008,128 +│ │ │ ├─BatchNorm2d: 5-26 [1, 128, 128, 64] 256 256 +│ │ │ └─LeakyReLU: 5-27 [1, 128, 128, 64] -- -- +│ │ ├─MaxPool2d: 3-9 [1, 128, 64, 64] -- -- │ │ └─ConvBlock: 3-10 [1, 128, 64, 64] -- -- -│ │ │ └─Sequential: 4-6 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-28 [1, 128, 64, 64] 16,512 67,633,152 -│ │ │ │ └─BatchNorm2d: 5-29 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-30 [1, 128, 64, 64] -- -- -│ └─EncodingBranch: 2-3 [1, 128, 64, 64] -- -- -│ │ └─Double3DConvBlock: 3-11 [1, 128, 1, 256, 64] -- -- +│ │ └─Sequential: 4-6 [1, 128, 64, 64] -- -- +│ │ ├─Conv2d: 5-28 [1, 128, 64, 64] 16,512 67,633,152 +│ │ ├─BatchNorm2d: 5-29 [1, 128, 64, 64] 256 256 +│ │ └─LeakyReLU: 5-30 [1, 128, 64, 64] -- -- +│ ├─EncodingBranch: 2-3 [1, 128, 64, 64] -- -- +│ │ ├─Double3DConvBlock: 3-11 [1, 128, 1, 256, 64] -- -- │ │ │ └─Sequential: 4-7 [1, 128, 1, 256, 64] -- -- -│ │ │ │ └─Conv3d: 5-31 [1, 128, 3, 256, 64] 3,584 176,160,768 -│ │ │ │ └─BatchNorm3d: 5-32 [1, 128, 3, 256, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-33 [1, 128, 3, 256, 64] -- -- -│ │ │ │ └─Conv3d: 5-34 [1, 128, 1, 256, 64] 442,496 7,249,854,464 -│ │ │ │ └─BatchNorm3d: 5-35 [1, 128, 1, 256, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-36 [1, 128, 1, 256, 64] -- -- -│ │ └─MaxPool2d: 3-12 [1, 128, 128, 64] -- -- -│ │ └─DoubleConvBlock: 3-13 [1, 128, 128, 64] -- -- +│ │ │ ├─Conv3d: 5-31 [1, 128, 3, 256, 64] 3,584 176,160,768 +│ │ │ ├─BatchNorm3d: 5-32 [1, 128, 3, 256, 64] 256 256 +│ │ │ ├─LeakyReLU: 5-33 [1, 128, 3, 256, 64] -- -- +│ │ │ ├─Conv3d: 5-34 [1, 128, 1, 256, 64] 442,496 7,249,854,464 +│ │ │ ├─BatchNorm3d: 5-35 [1, 128, 1, 256, 64] 256 256 +│ │ │ └─LeakyReLU: 5-36 [1, 128, 1, 256, 64] -- -- +│ │ ├─MaxPool2d: 3-12 [1, 128, 128, 64] -- -- +│ │ ├─DoubleConvBlock: 3-13 [1, 128, 128, 64] -- -- │ │ │ └─Sequential: 4-8 [1, 128, 128, 64] -- -- -│ │ │ │ └─Conv2d: 5-37 [1, 128, 128, 64] 147,584 1,209,008,128 -│ │ │ │ └─BatchNorm2d: 5-38 [1, 128, 128, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-39 [1, 128, 128, 64] -- -- -│ │ │ │ └─Conv2d: 5-40 [1, 128, 128, 64] 147,584 1,209,008,128 -│ │ │ │ └─BatchNorm2d: 5-41 [1, 128, 128, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-42 [1, 128, 128, 64] -- -- -│ │ └─MaxPool2d: 3-14 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-37 [1, 128, 128, 64] 147,584 1,209,008,128 +│ │ │ ├─BatchNorm2d: 5-38 [1, 128, 128, 64] 256 256 +│ │ │ ├─LeakyReLU: 5-39 [1, 128, 128, 64] -- -- +│ │ │ ├─Conv2d: 5-40 [1, 128, 128, 64] 147,584 1,209,008,128 +│ │ │ ├─BatchNorm2d: 5-41 [1, 128, 128, 64] 256 256 +│ │ │ └─LeakyReLU: 5-42 [1, 128, 128, 64] -- -- +│ │ ├─MaxPool2d: 3-14 [1, 128, 64, 64] -- -- │ │ └─ConvBlock: 3-15 [1, 128, 64, 64] -- -- -│ │ │ └─Sequential: 4-9 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-43 [1, 128, 64, 64] 16,512 67,633,152 -│ │ │ │ └─BatchNorm2d: 5-44 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-45 [1, 128, 64, 64] -- -- -│ └─ASPPBlock: 2-4 [1, 640, 64, 64] -- -- -│ │ └─AvgPool2d: 3-16 [1, 128, 1, 1] -- -- -│ │ └─Conv2d: 3-17 [1, 128, 64, 64] 16,512 67,633,152 -│ │ └─ConvBlock: 3-18 [1, 128, 64, 64] -- -- +│ │ └─Sequential: 4-9 [1, 128, 64, 64] -- -- +│ │ ├─Conv2d: 5-43 [1, 128, 64, 64] 16,512 67,633,152 +│ │ ├─BatchNorm2d: 5-44 [1, 128, 64, 64] 256 256 +│ │ └─LeakyReLU: 5-45 [1, 128, 64, 64] -- -- +│ ├─ASPPBlock: 2-4 [1, 640, 64, 64] -- -- +│ │ ├─AvgPool2d: 3-16 [1, 128, 1, 1] -- -- +│ │ ├─Conv2d: 3-17 [1, 128, 64, 64] 16,512 67,633,152 +│ │ ├─ConvBlock: 3-18 [1, 128, 64, 64] -- -- │ │ │ └─Sequential: 4-10 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-46 [1, 128, 64, 64] 16,512 67,633,152 -│ │ │ │ └─BatchNorm2d: 5-47 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-48 [1, 128, 64, 64] -- -- -│ │ └─ConvBlock: 3-19 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-46 [1, 128, 64, 64] 16,512 67,633,152 +│ │ │ ├─BatchNorm2d: 5-47 [1, 128, 64, 64] 256 256 +│ │ │ └─LeakyReLU: 5-48 [1, 128, 64, 64] -- -- +│ │ ├─ConvBlock: 3-19 [1, 128, 64, 64] -- -- │ │ │ └─Sequential: 4-11 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-49 [1, 128, 64, 64] 147,584 604,504,064 -│ │ │ │ └─BatchNorm2d: 5-50 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-51 [1, 128, 64, 64] -- -- -│ │ └─ConvBlock: 3-20 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-49 [1, 128, 64, 64] 147,584 604,504,064 +│ │ │ ├─BatchNorm2d: 5-50 [1, 128, 64, 64] 256 256 +│ │ │ └─LeakyReLU: 5-51 [1, 128, 64, 64] -- -- +│ │ ├─ConvBlock: 3-20 [1, 128, 64, 64] -- -- │ │ │ └─Sequential: 4-12 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-52 [1, 128, 64, 64] 147,584 604,504,064 -│ │ │ │ └─BatchNorm2d: 5-53 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-54 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-52 [1, 128, 64, 64] 147,584 604,504,064 +│ │ │ ├─BatchNorm2d: 5-53 [1, 128, 64, 64] 256 256 +│ │ │ └─LeakyReLU: 5-54 [1, 128, 64, 64] -- -- │ │ └─ConvBlock: 3-21 [1, 128, 64, 64] -- -- -│ │ │ └─Sequential: 4-13 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-55 [1, 128, 64, 64] 147,584 604,504,064 -│ │ │ │ └─BatchNorm2d: 5-56 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-57 [1, 128, 64, 64] -- -- -│ └─ASPPBlock: 2-5 [1, 640, 64, 64] -- -- -│ │ └─AvgPool2d: 3-22 [1, 128, 1, 1] -- -- -│ │ └─Conv2d: 3-23 [1, 128, 64, 64] 16,512 67,633,152 -│ │ └─ConvBlock: 3-24 [1, 128, 64, 64] -- -- +│ │ └─Sequential: 4-13 [1, 128, 64, 64] -- -- +│ │ ├─Conv2d: 5-55 [1, 128, 64, 64] 147,584 604,504,064 +│ │ ├─BatchNorm2d: 5-56 [1, 128, 64, 64] 256 256 +│ │ └─LeakyReLU: 5-57 [1, 128, 64, 64] -- -- +│ ├─ASPPBlock: 2-5 [1, 640, 64, 64] -- -- +│ │ ├─AvgPool2d: 3-22 [1, 128, 1, 1] -- -- +│ │ ├─Conv2d: 3-23 [1, 128, 64, 64] 16,512 67,633,152 +│ │ ├─ConvBlock: 3-24 [1, 128, 64, 64] -- -- │ │ │ └─Sequential: 4-14 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-58 [1, 128, 64, 64] 16,512 67,633,152 -│ │ │ │ └─BatchNorm2d: 5-59 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-60 [1, 128, 64, 64] -- -- -│ │ └─ConvBlock: 3-25 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-58 [1, 128, 64, 64] 16,512 67,633,152 +│ │ │ ├─BatchNorm2d: 5-59 [1, 128, 64, 64] 256 256 +│ │ │ └─LeakyReLU: 5-60 [1, 128, 64, 64] -- -- +│ │ ├─ConvBlock: 3-25 [1, 128, 64, 64] -- -- │ │ │ └─Sequential: 4-15 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-61 [1, 128, 64, 64] 147,584 604,504,064 -│ │ │ │ └─BatchNorm2d: 5-62 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-63 [1, 128, 64, 64] -- -- -│ │ └─ConvBlock: 3-26 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-61 [1, 128, 64, 64] 147,584 604,504,064 +│ │ │ ├─BatchNorm2d: 5-62 [1, 128, 64, 64] 256 256 +│ │ │ └─LeakyReLU: 5-63 [1, 128, 64, 64] -- -- +│ │ ├─ConvBlock: 3-26 [1, 128, 64, 64] -- -- │ │ │ └─Sequential: 4-16 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-64 [1, 128, 64, 64] 147,584 604,504,064 -│ │ │ │ └─BatchNorm2d: 5-65 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-66 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-64 [1, 128, 64, 64] 147,584 604,504,064 +│ │ │ ├─BatchNorm2d: 5-65 [1, 128, 64, 64] 256 256 +│ │ │ └─LeakyReLU: 5-66 [1, 128, 64, 64] -- -- │ │ └─ConvBlock: 3-27 [1, 128, 64, 64] -- -- -│ │ │ └─Sequential: 4-17 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-67 [1, 128, 64, 64] 147,584 604,504,064 -│ │ │ │ └─BatchNorm2d: 5-68 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-69 [1, 128, 64, 64] -- -- -│ └─ASPPBlock: 2-6 [1, 640, 64, 64] -- -- -│ │ └─AvgPool2d: 3-28 [1, 128, 1, 1] -- -- -│ │ └─Conv2d: 3-29 [1, 128, 64, 64] 16,512 67,633,152 -│ │ └─ConvBlock: 3-30 [1, 128, 64, 64] -- -- +│ │ └─Sequential: 4-17 [1, 128, 64, 64] -- -- +│ │ ├─Conv2d: 5-67 [1, 128, 64, 64] 147,584 604,504,064 +│ │ ├─BatchNorm2d: 5-68 [1, 128, 64, 64] 256 256 +│ │ └─LeakyReLU: 5-69 [1, 128, 64, 64] -- -- +│ ├─ASPPBlock: 2-6 [1, 640, 64, 64] -- -- +│ │ ├─AvgPool2d: 3-28 [1, 128, 1, 1] -- -- +│ │ ├─Conv2d: 3-29 [1, 128, 64, 64] 16,512 67,633,152 +│ │ ├─ConvBlock: 3-30 [1, 128, 64, 64] -- -- │ │ │ └─Sequential: 4-18 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-70 [1, 128, 64, 64] 16,512 67,633,152 -│ │ │ │ └─BatchNorm2d: 5-71 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-72 [1, 128, 64, 64] -- -- -│ │ └─ConvBlock: 3-31 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-70 [1, 128, 64, 64] 16,512 67,633,152 +│ │ │ ├─BatchNorm2d: 5-71 [1, 128, 64, 64] 256 256 +│ │ │ └─LeakyReLU: 5-72 [1, 128, 64, 64] -- -- +│ │ ├─ConvBlock: 3-31 [1, 128, 64, 64] -- -- │ │ │ └─Sequential: 4-19 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-73 [1, 128, 64, 64] 147,584 604,504,064 -│ │ │ │ └─BatchNorm2d: 5-74 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-75 [1, 128, 64, 64] -- -- -│ │ └─ConvBlock: 3-32 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-73 [1, 128, 64, 64] 147,584 604,504,064 +│ │ │ ├─BatchNorm2d: 5-74 [1, 128, 64, 64] 256 256 +│ │ │ └─LeakyReLU: 5-75 [1, 128, 64, 64] -- -- +│ │ ├─ConvBlock: 3-32 [1, 128, 64, 64] -- -- │ │ │ └─Sequential: 4-20 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-76 [1, 128, 64, 64] 147,584 604,504,064 -│ │ │ │ └─BatchNorm2d: 5-77 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-78 [1, 128, 64, 64] -- -- +│ │ │ ├─Conv2d: 5-76 [1, 128, 64, 64] 147,584 604,504,064 +│ │ │ ├─BatchNorm2d: 5-77 [1, 128, 64, 64] 256 256 +│ │ │ └─LeakyReLU: 5-78 [1, 128, 64, 64] -- -- │ │ └─ConvBlock: 3-33 [1, 128, 64, 64] -- -- -│ │ │ └─Sequential: 4-21 [1, 128, 64, 64] -- -- -│ │ │ │ └─Conv2d: 5-79 [1, 128, 64, 64] 147,584 604,504,064 -│ │ │ │ └─BatchNorm2d: 5-80 [1, 128, 64, 64] 256 256 -│ │ │ │ └─LeakyReLU: 5-81 [1, 128, 64, 64] -- -- -│ └─ConvBlock: 2-7 [1, 128, 64, 64] -- -- +│ │ └─Sequential: 4-21 [1, 128, 64, 64] -- -- +│ │ ├─Conv2d: 5-79 [1, 128, 64, 64] 147,584 604,504,064 +│ │ ├─BatchNorm2d: 5-80 [1, 128, 64, 64] 256 256 +│ │ └─LeakyReLU: 5-81 [1, 128, 64, 64] -- -- +│ ├─ConvBlock: 2-7 [1, 128, 64, 64] -- -- │ │ └─Sequential: 3-34 [1, 128, 64, 64] -- -- -│ │ │ └─Conv2d: 4-22 [1, 128, 64, 64] 82,048 336,068,608 -│ │ │ └─BatchNorm2d: 4-23 [1, 128, 64, 64] 256 256 -│ │ │ └─LeakyReLU: 4-24 [1, 128, 64, 64] -- -- -│ └─ConvBlock: 2-8 [1, 128, 64, 64] -- -- +│ │ ├─Conv2d: 4-22 [1, 128, 64, 64] 82,048 336,068,608 +│ │ ├─BatchNorm2d: 4-23 [1, 128, 64, 64] 256 256 +│ │ └─LeakyReLU: 4-24 [1, 128, 64, 64] -- -- +│ ├─ConvBlock: 2-8 [1, 128, 64, 64] -- -- │ │ └─Sequential: 3-35 [1, 128, 64, 64] -- -- -│ │ │ └─Conv2d: 4-25 [1, 128, 64, 64] 82,048 336,068,608 -│ │ │ └─BatchNorm2d: 4-26 [1, 128, 64, 64] 256 256 -│ │ │ └─LeakyReLU: 4-27 [1, 128, 64, 64] -- -- +│ │ ├─Conv2d: 4-25 [1, 128, 64, 64] 82,048 336,068,608 +│ │ ├─BatchNorm2d: 4-26 [1, 128, 64, 64] 256 256 +│ │ └─LeakyReLU: 4-27 [1, 128, 64, 64] -- -- │ └─ConvBlock: 2-9 [1, 128, 64, 64] -- -- -│ │ └─Sequential: 3-36 [1, 128, 64, 64] -- -- -│ │ │ └─Conv2d: 4-28 [1, 128, 64, 64] 82,048 336,068,608 -│ │ │ └─BatchNorm2d: 4-29 [1, 128, 64, 64] 256 256 -│ │ │ └─LeakyReLU: 4-30 [1, 128, 64, 64] -- -- -├─TMVANet_Decoder: 1-2 [1, 4, 256, 64] -- -- -│ └─ConvBlock: 2-10 [1, 128, 64, 64] -- -- -│ │ └─Sequential: 3-37 [1, 128, 64, 64] -- -- -│ │ │ └─Conv2d: 4-31 [1, 128, 64, 64] 49,280 201,850,880 -│ │ │ └─BatchNorm2d: 4-32 [1, 128, 64, 64] 256 256 -│ │ │ └─LeakyReLU: 4-33 [1, 128, 64, 64] -- -- -│ └─ConvBlock: 2-11 [1, 128, 64, 64] -- -- -│ │ └─Sequential: 3-38 [1, 128, 64, 64] -- -- -│ │ │ └─Conv2d: 4-34 [1, 128, 64, 64] 49,280 201,850,880 -│ │ │ └─BatchNorm2d: 4-35 [1, 128, 64, 64] 256 256 -│ │ │ └─LeakyReLU: 4-36 [1, 128, 64, 64] -- -- -│ └─ConvTranspose2d: 2-12 [1, 128, 128, 64] 98,432 806,354,944 -│ └─ConvTranspose2d: 2-13 [1, 128, 128, 128] 196,736 3,223,322,624 -│ └─DoubleConvBlock: 2-14 [1, 128, 128, 64] -- -- -│ │ └─Sequential: 3-39 [1, 128, 128, 64] -- -- -│ │ │ └─Conv2d: 4-37 [1, 128, 128, 64] 147,584 1,209,008,128 -│ │ │ └─BatchNorm2d: 4-38 [1, 128, 128, 64] 256 256 -│ │ │ └─LeakyReLU: 4-39 [1, 128, 128, 64] -- -- -│ │ │ └─Conv2d: 4-40 [1, 128, 128, 64] 147,584 1,209,008,128 -│ │ │ └─BatchNorm2d: 4-41 [1, 128, 128, 64] 256 256 -│ │ │ └─LeakyReLU: 4-42 [1, 128, 128, 64] -- -- -│ └─DoubleConvBlock: 2-15 [1, 128, 128, 128] -- -- -│ │ └─Sequential: 3-40 [1, 128, 128, 128] -- -- -│ │ │ └─Conv2d: 4-43 [1, 128, 128, 128] 147,584 2,418,016,256 -│ │ │ └─BatchNorm2d: 4-44 [1, 128, 128, 128] 256 256 -│ │ │ └─LeakyReLU: 4-45 [1, 128, 128, 128] -- -- -│ │ │ └─Conv2d: 4-46 [1, 128, 128, 128] 147,584 2,418,016,256 -│ │ │ └─BatchNorm2d: 4-47 [1, 128, 128, 128] 256 256 -│ │ │ └─LeakyReLU: 4-48 [1, 128, 128, 128] -- -- -│ └─ConvTranspose2d: 2-16 [1, 128, 256, 64] 32,896 538,968,064 -│ └─ConvTranspose2d: 2-17 [1, 128, 256, 256] 65,664 4,303,355,904 -│ └─DoubleConvBlock: 2-18 [1, 128, 256, 64] -- -- -│ │ └─Sequential: 3-41 [1, 128, 256, 64] -- -- -│ │ │ └─Conv2d: 4-49 [1, 128, 256, 64] 147,584 2,418,016,256 -│ │ │ └─BatchNorm2d: 4-50 [1, 128, 256, 64] 256 256 -│ │ │ └─LeakyReLU: 4-51 [1, 128, 256, 64] -- -- -│ │ │ └─Conv2d: 4-52 [1, 128, 256, 64] 147,584 2,418,016,256 -│ │ │ └─BatchNorm2d: 4-53 [1, 128, 256, 64] 256 256 -│ │ │ └─LeakyReLU: 4-54 [1, 128, 256, 64] -- -- -│ └─DoubleConvBlock: 2-19 [1, 128, 256, 256] -- -- -│ │ └─Sequential: 3-42 [1, 128, 256, 256] -- -- -│ │ │ └─Conv2d: 4-55 [1, 128, 256, 256] 147,584 9,672,065,024 -│ │ │ └─BatchNorm2d: 4-56 [1, 128, 256, 256] 256 256 -│ │ │ └─LeakyReLU: 4-57 [1, 128, 256, 256] -- -- -│ │ │ └─Conv2d: 4-58 [1, 128, 256, 256] 147,584 9,672,065,024 -│ │ │ └─BatchNorm2d: 4-59 [1, 128, 256, 256] 256 256 -│ │ │ └─LeakyReLU: 4-60 [1, 128, 256, 256] -- -- -│ └─Conv2d: 2-20 [1, 4, 256, 64] 516 8,454,144 -│ └─Conv2d: 2-21 [1, 4, 256, 256] 516 33,816,576 +│ └─Sequential: 3-36 [1, 128, 64, 64] -- -- +│ ├─Conv2d: 4-28 [1, 128, 64, 64] 82,048 336,068,608 +│ ├─BatchNorm2d: 4-29 [1, 128, 64, 64] 256 256 +│ └─LeakyReLU: 4-30 [1, 128, 64, 64] -- -- +└─TMVANet_Decoder: 1-2 [1, 4, 256, 64] -- -- + ├─ConvBlock: 2-10 [1, 128, 64, 64] -- -- + │ └─Sequential: 3-37 [1, 128, 64, 64] -- -- + │ ├─Conv2d: 4-31 [1, 128, 64, 64] 49,280 201,850,880 + │ ├─BatchNorm2d: 4-32 [1, 128, 64, 64] 256 256 + │ └─LeakyReLU: 4-33 [1, 128, 64, 64] -- -- + ├─ConvBlock: 2-11 [1, 128, 64, 64] -- -- + │ └─Sequential: 3-38 [1, 128, 64, 64] -- -- + │ ├─Conv2d: 4-34 [1, 128, 64, 64] 49,280 201,850,880 + │ ├─BatchNorm2d: 4-35 [1, 128, 64, 64] 256 256 + │ └─LeakyReLU: 4-36 [1, 128, 64, 64] -- -- + ├─ConvTranspose2d: 2-12 [1, 128, 128, 64] 98,432 806,354,944 + ├─ConvTranspose2d: 2-13 [1, 128, 128, 128] 196,736 3,223,322,624 + ├─DoubleConvBlock: 2-14 [1, 128, 128, 64] -- -- + │ └─Sequential: 3-39 [1, 128, 128, 64] -- -- + │ ├─Conv2d: 4-37 [1, 128, 128, 64] 147,584 1,209,008,128 + │ ├─BatchNorm2d: 4-38 [1, 128, 128, 64] 256 256 + │ ├─LeakyReLU: 4-39 [1, 128, 128, 64] -- -- + │ ├─Conv2d: 4-40 [1, 128, 128, 64] 147,584 1,209,008,128 + │ ├─BatchNorm2d: 4-41 [1, 128, 128, 64] 256 256 + │ └─LeakyReLU: 4-42 [1, 128, 128, 64] -- -- + ├─DoubleConvBlock: 2-15 [1, 128, 128, 128] -- -- + │ └─Sequential: 3-40 [1, 128, 128, 128] -- -- + │ ├─Conv2d: 4-43 [1, 128, 128, 128] 147,584 2,418,016,256 + │ ├─BatchNorm2d: 4-44 [1, 128, 128, 128] 256 256 + │ ├─LeakyReLU: 4-45 [1, 128, 128, 128] -- -- + │ ├─Conv2d: 4-46 [1, 128, 128, 128] 147,584 2,418,016,256 + │ ├─BatchNorm2d: 4-47 [1, 128, 128, 128] 256 256 + │ └─LeakyReLU: 4-48 [1, 128, 128, 128] -- -- + ├─ConvTranspose2d: 2-16 [1, 128, 256, 64] 32,896 538,968,064 + ├─ConvTranspose2d: 2-17 [1, 128, 256, 256] 65,664 4,303,355,904 + ├─DoubleConvBlock: 2-18 [1, 128, 256, 64] -- -- + │ └─Sequential: 3-41 [1, 128, 256, 64] -- -- + │ ├─Conv2d: 4-49 [1, 128, 256, 64] 147,584 2,418,016,256 + │ ├─BatchNorm2d: 4-50 [1, 128, 256, 64] 256 256 + │ ├─LeakyReLU: 4-51 [1, 128, 256, 64] -- -- + │ ├─Conv2d: 4-52 [1, 128, 256, 64] 147,584 2,418,016,256 + │ ├─BatchNorm2d: 4-53 [1, 128, 256, 64] 256 256 + │ └─LeakyReLU: 4-54 [1, 128, 256, 64] -- -- + ├─DoubleConvBlock: 2-19 [1, 128, 256, 256] -- -- + │ └─Sequential: 3-42 [1, 128, 256, 256] -- -- + │ ├─Conv2d: 4-55 [1, 128, 256, 256] 147,584 9,672,065,024 + │ ├─BatchNorm2d: 4-56 [1, 128, 256, 256] 256 256 + │ ├─LeakyReLU: 4-57 [1, 128, 256, 256] -- -- + │ ├─Conv2d: 4-58 [1, 128, 256, 256] 147,584 9,672,065,024 + │ ├─BatchNorm2d: 4-59 [1, 128, 256, 256] 256 256 + │ └─LeakyReLU: 4-60 [1, 128, 256, 256] -- -- + ├─Conv2d: 2-20 [1, 4, 256, 64] 516 8,454,144 + └─Conv2d: 2-21 [1, 4, 256, 256] 516 33,816,576 ======================================================================================================================== Total params: 5,630,984 Trainable params: 5,630,984 diff --git a/tests/test_output/too_many_linear.out b/tests/test_output/too_many_linear.out index 878c017..783d789 100644 --- a/tests/test_output/too_many_linear.out +++ b/tests/test_output/too_many_linear.out @@ -2,15 +2,15 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== ReuseLinear [2, 10] -- -├─Sequential: 1-1 [2, 10] -- -│ └─Linear: 2-1 [2, 10] 110 -│ └─ReLU: 2-2 [2, 10] -- -│ └─Linear: 2-3 [2, 10] (recursive) -│ └─ReLU: 2-4 [2, 10] -- -│ └─Linear: 2-5 [2, 10] (recursive) -│ └─ReLU: 2-6 [2, 10] -- -│ └─Linear: 2-7 [2, 10] (recursive) -│ └─ReLU: 2-8 [2, 10] -- +└─Sequential: 1-1 [2, 10] -- + ├─Linear: 2-1 [2, 10] 110 + ├─ReLU: 2-2 [2, 10] -- + ├─Linear: 2-3 [2, 10] (recursive) + ├─ReLU: 2-4 [2, 10] -- + ├─Linear: 2-5 [2, 10] (recursive) + ├─ReLU: 2-6 [2, 10] -- + ├─Linear: 2-7 [2, 10] (recursive) + └─ReLU: 2-8 [2, 10] -- ========================================================================================== Total params: 110 Trainable params: 110 diff --git a/tests/test_output/too_many_linear_plus_existing_hooks.out b/tests/test_output/too_many_linear_plus_existing_hooks.out index 0aa9e9d..835f2f6 100644 --- a/tests/test_output/too_many_linear_plus_existing_hooks.out +++ b/tests/test_output/too_many_linear_plus_existing_hooks.out @@ -2,15 +2,15 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== ReuseLinearExtended [2, 10] -- -├─Sequential: 1-1 [2, 10] -- -│ └─Linear: 2-1 [2, 10] 110 -│ └─ReLU: 2-2 [2, 10] -- -│ └─Linear: 2-3 [2, 10] (recursive) -│ └─ReLU: 2-4 [2, 10] -- -│ └─Linear: 2-5 [2, 10] (recursive) -│ └─ReLU: 2-6 [2, 10] -- -│ └─Linear: 2-7 [2, 10] (recursive) -│ └─ReLU: 2-8 [2, 10] -- +└─Sequential: 1-1 [2, 10] -- + ├─Linear: 2-1 [2, 10] 110 + ├─ReLU: 2-2 [2, 10] -- + ├─Linear: 2-3 [2, 10] (recursive) + ├─ReLU: 2-4 [2, 10] -- + ├─Linear: 2-5 [2, 10] (recursive) + ├─ReLU: 2-6 [2, 10] -- + ├─Linear: 2-7 [2, 10] (recursive) + └─ReLU: 2-8 [2, 10] -- ========================================================================================== Total params: 110 Trainable params: 110 @@ -26,15 +26,15 @@ Estimated Total Size (MB): 0.00 Layer (type:depth-idx) Output Shape Param # ========================================================================================== ReuseLinearExtended [2, 10] -- -├─Sequential: 1-1 [2, 10] -- -│ └─Linear: 2-1 [2, 10] 110 -│ └─ReLU: 2-2 [2, 10] -- -│ └─Linear: 2-3 [2, 10] (recursive) -│ └─ReLU: 2-4 [2, 10] -- -│ └─Linear: 2-5 [2, 10] (recursive) -│ └─ReLU: 2-6 [2, 10] -- -│ └─Linear: 2-7 [2, 10] (recursive) -│ └─ReLU: 2-8 [2, 10] -- +└─Sequential: 1-1 [2, 10] -- + ├─Linear: 2-1 [2, 10] 110 + ├─ReLU: 2-2 [2, 10] -- + ├─Linear: 2-3 [2, 10] (recursive) + ├─ReLU: 2-4 [2, 10] -- + ├─Linear: 2-5 [2, 10] (recursive) + ├─ReLU: 2-6 [2, 10] -- + ├─Linear: 2-7 [2, 10] (recursive) + └─ReLU: 2-8 [2, 10] -- ========================================================================================== Total params: 110 Trainable params: 110 diff --git a/tests/test_output/too_many_relus.out b/tests/test_output/too_many_relus.out index 3243a18..9c2b996 100644 --- a/tests/test_output/too_many_relus.out +++ b/tests/test_output/too_many_relus.out @@ -2,20 +2,20 @@ Layer (type:depth-idx) Output Shape Param # ========================================================================================== ReuseReLU [4, 8, 11, 11] -- -├─Sequential: 1-1 [4, 8, 11, 11] -- -│ └─ReflectionPad2d: 2-1 [4, 4, 70, 70] -- -│ └─Conv2d: 2-2 [4, 1, 70, 70] 5 -│ └─BatchNorm2d: 2-3 [4, 1, 70, 70] 2 -│ └─ReLU: 2-4 [4, 1, 70, 70] -- -│ └─Conv2d: 2-5 [4, 2, 36, 36] 4 -│ └─BatchNorm2d: 2-6 [4, 2, 36, 36] 4 -│ └─ReLU: 2-7 [4, 2, 36, 36] -- -│ └─Conv2d: 2-8 [4, 4, 19, 19] 12 -│ └─BatchNorm2d: 2-9 [4, 4, 19, 19] 8 -│ └─ReLU: 2-10 [4, 4, 19, 19] -- -│ └─Conv2d: 2-11 [4, 8, 11, 11] 40 -│ └─BatchNorm2d: 2-12 [4, 8, 11, 11] 16 -│ └─ReLU: 2-13 [4, 8, 11, 11] -- +└─Sequential: 1-1 [4, 8, 11, 11] -- + ├─ReflectionPad2d: 2-1 [4, 4, 70, 70] -- + ├─Conv2d: 2-2 [4, 1, 70, 70] 5 + ├─BatchNorm2d: 2-3 [4, 1, 70, 70] 2 + ├─ReLU: 2-4 [4, 1, 70, 70] -- + ├─Conv2d: 2-5 [4, 2, 36, 36] 4 + ├─BatchNorm2d: 2-6 [4, 2, 36, 36] 4 + ├─ReLU: 2-7 [4, 2, 36, 36] -- + ├─Conv2d: 2-8 [4, 4, 19, 19] 12 + ├─BatchNorm2d: 2-9 [4, 4, 19, 19] 8 + ├─ReLU: 2-10 [4, 4, 19, 19] -- + ├─Conv2d: 2-11 [4, 8, 11, 11] 40 + ├─BatchNorm2d: 2-12 [4, 8, 11, 11] 16 + └─ReLU: 2-13 [4, 8, 11, 11] -- ========================================================================================== Total params: 91 Trainable params: 91 diff --git a/tests/test_output/trainable_column.out b/tests/test_output/trainable_column.out index e20089c..4533702 100644 --- a/tests/test_output/trainable_column.out +++ b/tests/test_output/trainable_column.out @@ -5,7 +5,7 @@ MixedTrainable -- [1, 1, 1] ├─Conv1d: 1-1 [1] [1, 1, 1] [1, 1, 1] True ├─Conv1d: 1-2 [1] [1, 1, 1] [1, 1, 1] Partial ├─Conv1d: 1-3 [1] [1, 1, 1] [1, 1, 1] False -├─Dropout: 1-4 -- [1, 1, 1] [1, 1, 1] -- +└─Dropout: 1-4 -- [1, 1, 1] [1, 1, 1] -- ============================================================================================================================================ Total params: 6 Trainable params: 3 diff --git a/tests/torchinfo_test.py b/tests/torchinfo_test.py index 99dc79a..0aa16a5 100644 --- a/tests/torchinfo_test.py +++ b/tests/torchinfo_test.py @@ -262,6 +262,23 @@ def test_lstm() -> None: assert len(results.summary_list) == 4, "Should find 4 layers" +def test_lstm_ascii() -> None: + # This model has named parameters, which render in a hierarchical manner. + # Make sure that they respect the `ascii_only` setting in the same way that + # the main layers do. + results = summary( + LSTMNet(), + input_size=(1, 100), + dtypes=[torch.long], + verbose=Verbosity.VERBOSE, + col_width=20, + col_names=("kernel_size", "output_size", "num_params", "mult_adds"), + row_settings=("var_names", "ascii_only"), + ) + + assert len(results.summary_list) == 4, "Should find 4 layers" + + def test_lstm_custom_batch_size() -> None: # batch_size intentionally omitted. results = summary(LSTMNet(), (100,), dtypes=[torch.long], batch_dim=1) diff --git a/torchinfo/formatting.py b/torchinfo/formatting.py index 4a5e58c..17bf004 100644 --- a/torchinfo/formatting.py +++ b/torchinfo/formatting.py @@ -1,10 +1,10 @@ from __future__ import annotations import math -from typing import Any +from typing import Any, Iterable, Union from .enums import ColumnSettings, RowSettings, Units, Verbosity -from .layer_info import LayerInfo +from .layer_info import LayerInfo, NamedParamInfo HEADER_TITLES = { ColumnSettings.KERNEL_SIZE: "Kernel Shape", @@ -21,6 +21,8 @@ Units.MEGABYTES: 1e6, Units.NONE: 1, } +LAYER_TYPES = Union[LayerInfo, NamedParamInfo] +LAYER_TREE_TYPE = list[Union[LAYER_TYPES, "LAYER_TREE_TYPE"]] class FormattingOptions: @@ -54,16 +56,6 @@ def __init__( def str_(val: Any) -> str: return str(val) if val else "--" - def get_start_str(self, depth: int) -> str: - """This function should handle all ascii/non-ascii-related characters.""" - if depth == 0: - return "" - if depth == 1: - return "+ " if self.ascii_only else "├─" - return ("| " if self.ascii_only else "│ ") * (depth - 1) + ( - "+ " if self.ascii_only else "└─" - ) - def set_layer_name_width( self, summary_list: list[LayerInfo], align_val: int = 5 ) -> None: @@ -100,29 +92,44 @@ def header_row(self) -> str: return self.format_row(f"Layer (type{layer_header})", HEADER_TITLES) def layer_info_to_row( - self, layer_info: LayerInfo, reached_max_depth: bool, total_params: int + self, + layer_info: LAYER_TYPES, + reached_max_depth: bool, + total_params: int, + vertical_bars: tuple[bool, ...], ) -> str: """Convert layer_info to string representation of a row.""" - values_for_row = { - ColumnSettings.KERNEL_SIZE: self.str_(layer_info.kernel_size), - ColumnSettings.INPUT_SIZE: self.str_(layer_info.input_size), - ColumnSettings.OUTPUT_SIZE: self.str_(layer_info.output_size), - ColumnSettings.NUM_PARAMS: layer_info.num_params_to_str(reached_max_depth), - ColumnSettings.PARAMS_PERCENT: layer_info.params_percent( - total_params, reached_max_depth - ), - ColumnSettings.MULT_ADDS: layer_info.macs_to_str(reached_max_depth), - ColumnSettings.TRAINABLE: self.str_(layer_info.trainable), - } - start_str = self.get_start_str(layer_info.depth) - layer_name = layer_info.get_layer_name(self.show_var_name, self.show_depth) - new_line = self.format_row(f"{start_str}{layer_name}", values_for_row) - - if self.verbose == Verbosity.VERBOSE: - for inner_name, inner_layer_info in layer_info.inner_layers.items(): - prefix = self.get_start_str(layer_info.depth + 1) - new_line += self.format_row(f"{prefix}{inner_name}", inner_layer_info) - return new_line + tree_prefix = get_tree_prefix(vertical_bars, ascii_only=self.ascii_only) + + if isinstance(layer_info, LayerInfo): + layer_name = layer_info.get_layer_name(self.show_var_name, self.show_depth) + values_for_row = { + ColumnSettings.KERNEL_SIZE: self.str_(layer_info.kernel_size), + ColumnSettings.INPUT_SIZE: self.str_(layer_info.input_size), + ColumnSettings.OUTPUT_SIZE: self.str_(layer_info.output_size), + ColumnSettings.NUM_PARAMS: layer_info.num_params_to_str( + reached_max_depth + ), + ColumnSettings.PARAMS_PERCENT: layer_info.params_percent( + total_params, reached_max_depth + ), + ColumnSettings.MULT_ADDS: layer_info.macs_to_str(reached_max_depth), + ColumnSettings.TRAINABLE: self.str_(layer_info.trainable), + } + + elif isinstance(layer_info, NamedParamInfo): + layer_name = layer_info.name + tree_icon = get_tree_icon( + horizontal_bar=True, + vertical_bar=not layer_info.is_last, + ascii_only=self.ascii_only, + ) + values_for_row = { + ColumnSettings.KERNEL_SIZE: self.str_(layer_info.kernel_size), + ColumnSettings.NUM_PARAMS: f"{tree_icon}{layer_info.num_params:,}", + } + + return self.format_row(f"{tree_prefix}{layer_name}", values_for_row) def layers_to_str(self, summary_list: list[LayerInfo], total_params: int) -> str: """ @@ -130,16 +137,110 @@ def layers_to_str(self, summary_list: list[LayerInfo], total_params: int) -> str Container modules are already dealt with in add_missing_container_layers. """ new_str = "" + + # Any layers that are going to be revealed/hidden have to be handled + # before we calculate the layer tree, otherwise the hierarchy won't + # be rendered correctly. + + visible_layers: list[LAYER_TYPES] = [] + for layer_info in summary_list: - if ( - layer_info.depth > self.max_depth - or self.hide_recursive_layers - and layer_info.is_recursive - ): + if layer_info.depth > self.max_depth: continue + if self.hide_recursive_layers and layer_info.is_recursive: + continue + + visible_layers.append(layer_info) + + if self.verbose == Verbosity.VERBOSE: + visible_layers += layer_info.inner_layers + + layer_tree = make_layer_tree(visible_layers) - reached_max_depth = layer_info.depth == self.max_depth + for layer_info_, vertical_bars in iter_layer_tree(layer_tree): + reached_max_depth = layer_info_.depth == self.max_depth new_str += self.layer_info_to_row( - layer_info, reached_max_depth, total_params + layer_info_, reached_max_depth, total_params, vertical_bars ) return new_str + + +def make_layer_tree(summary_list: list[LAYER_TYPES]) -> LAYER_TREE_TYPE: + tree, _ = _make_layer_tree(summary_list, 0, 0) + return tree + + +def _make_layer_tree( + summary_list: list[LAYER_TYPES], curr_depth: int, cursor: int +) -> tuple[LAYER_TREE_TYPE, int]: + tree: LAYER_TREE_TYPE = [] + + while cursor < len(summary_list): + layer_info = summary_list[cursor] + depth = layer_info.depth + + if depth < curr_depth: + break + + if depth == curr_depth: + tree.append(layer_info) + cursor += 1 + + if depth > curr_depth: + assert depth == curr_depth + 1 + subtree, cursor = _make_layer_tree(summary_list, depth, cursor) + tree.append(subtree) + + return tree, cursor + + +def iter_layer_tree( + layer_tree: LAYER_TREE_TYPE, +) -> Iterable[tuple[LAYER_TYPES, tuple[bool, ...]]]: + for layer_info, vertical_bars in _iter_layer_tree(layer_tree, ()): + yield layer_info, vertical_bars[1:] + + +def _iter_layer_tree( + layer_tree: LAYER_TREE_TYPE, vertical_bars: tuple[bool, ...] +) -> Iterable[tuple[LAYER_TYPES, tuple[bool, ...]]]: + for i, item in enumerate(layer_tree): + if isinstance(item, (LayerInfo, NamedParamInfo)): + stop_vertical_bars = i + + for i, item in enumerate(layer_tree): + if isinstance(item, (LayerInfo, NamedParamInfo)): + yield item, vertical_bars + (i != stop_vertical_bars,) + + else: + yield from _iter_layer_tree(item, vertical_bars + (i < stop_vertical_bars,)) + + +def get_tree_prefix( + vertical_bars: tuple[bool, ...], *, ascii_only: bool, indent: int = 4 +) -> str: + i_innermost = len(vertical_bars) - 1 + tree_icons = [ + get_tree_icon( + horizontal_bar=(i == i_innermost), + vertical_bar=vertical_bar, + ascii_only=ascii_only, + ) + for i, vertical_bar in enumerate(vertical_bars) + ] + indent_str = " " * indent + return indent_str.join(tree_icons) + + +def get_tree_icon(*, horizontal_bar: bool, vertical_bar: bool, ascii_only: bool) -> str: + icons = [ + [ + [" ", "│"], # ascii_only=0, horizontal_bar=0 + ["└─", "├─"], # ascii_only=0, horizontal_bar=1 + ], + [ + [" ", "|"], # ascii_only=1, horizontal_bar=0 + ["'--", "|--"], # ascii_only=1, horizontal_bar=1 + ], + ] + return icons[ascii_only][horizontal_bar][vertical_bar] diff --git a/torchinfo/layer_info.py b/torchinfo/layer_info.py index 5850206..df9dc11 100644 --- a/torchinfo/layer_info.py +++ b/torchinfo/layer_info.py @@ -1,5 +1,6 @@ from __future__ import annotations +from dataclasses import dataclass from typing import Any, Dict, Iterable, Sequence, Union import numpy as np @@ -7,8 +8,6 @@ from torch import nn from torch.jit import ScriptModule -from .enums import ColumnSettings - try: from torch.nn.parameter import is_lazy except ImportError: @@ -42,7 +41,7 @@ def __init__( else module.__class__.__name__ ) # {layer name: {col_name: value_for_row}} - self.inner_layers: dict[str, dict[ColumnSettings, Any]] = {} + self.inner_layers: list[NamedParamInfo] = [] self.depth = depth self.depth_index: int | None = None # set at the very end self.children: list[LayerInfo] = [] # set at the very end @@ -187,9 +186,8 @@ def calculate_num_params(self) -> None: self.num_params = 0 self.param_bytes = 0 self.trainable_params = 0 - self.inner_layers = {} + self.inner_layers = [] - final_name = "" for name, param in self.module.named_parameters(): if is_lazy(param): self.contains_lazy_param = True @@ -210,16 +208,17 @@ def calculate_num_params(self) -> None: # RNN modules have inner weights such as weight_ih_l0 # Don't show parameters for the overall model, show for individual layers if self.parent_info is not None or "." not in name: - self.inner_layers[name] = { - ColumnSettings.KERNEL_SIZE: str(ksize), - ColumnSettings.NUM_PARAMS: f"├─{cur_params:,}", - } - final_name = name - # Fix the final row to display more nicely + self.inner_layers.append( + NamedParamInfo( + name=name, + depth=self.depth + 1, + kernel_size=ksize, + num_params=cur_params, + ) + ) + if self.inner_layers: - self.inner_layers[final_name][ - ColumnSettings.NUM_PARAMS - ] = f"└─{self.inner_layers[final_name][ColumnSettings.NUM_PARAMS][2:]}" + self.inner_layers[-1].is_last = True def calculate_macs(self) -> None: """ @@ -316,6 +315,17 @@ def leftover_trainable_params(self) -> int: ) +@dataclass +class NamedParamInfo: + """Information to display regarding a named parameter of a layer.""" + + name: str + depth: int + kernel_size: list[int] + num_params: int + is_last: bool = False + + def nested_list_size(inputs: Sequence[Any] | torch.Tensor) -> tuple[list[int], int]: """Flattens nested list size.""" if hasattr(inputs, "tensors"):