11# torchinfo
22
3- [ ![ Python 3.7+] ( https://img.shields.io/badge/python-3.7+-blue.svg )] ( https://www.python.org/downloads/release/python-360 / )
3+ [ ![ Python 3.7+] ( https://img.shields.io/badge/python-3.7+-blue.svg )] ( https://www.python.org/downloads/release/python-370 / )
44[ ![ PyPI version] ( https://badge.fury.io/py/torchinfo.svg )] ( https://badge.fury.io/py/torchinfo )
55[ ![ Conda version] ( https://img.shields.io/conda/vn/conda-forge/torchinfo )] ( https://anaconda.org/conda-forge/torchinfo )
66[ ![ Build Status] ( https://github.com/TylerYep/torchinfo/actions/workflows/test.yml/badge.svg )] ( https://github.com/TylerYep/torchinfo/actions/workflows/test.yml )
@@ -43,7 +43,7 @@ summary(model, input_size=(batch_size, 1, 28, 28))
4343================================================================================================================
4444Layer (type:depth-idx) Input Shape Output Shape Param # Mult-Adds
4545================================================================================================================
46- SingleInputNet -- -- -- --
46+ SingleInputNet [7, 1, 28, 28] [7, 10] -- --
4747├─Conv2d: 1-1 [7, 1, 28, 28] [7, 10, 24, 24] 260 1,048,320
4848├─Conv2d: 1-2 [7, 10, 12, 12] [7, 20, 8, 8] 5,020 2,248,960
4949├─Dropout2d: 1-3 [7, 20, 8, 8] [7, 20, 8, 8] -- --
@@ -268,8 +268,8 @@ summary(
268268========================================================================================================================
269269Layer (type (var_name)) Kernel Shape Output Shape Param # Mult-Adds
270270========================================================================================================================
271- LSTMNet -- -- -- --
272- ├─Embedding (embedding) [300, 20] [1, 100, 300] 6,000 6,000
271+ LSTMNet (LSTMNet) -- [100, 20] -- --
272+ ├─Embedding (embedding) -- [1, 100, 300] 6,000 6,000
273273│ └─weight [300, 20] └─6,000
274274├─LSTM (encoder) -- [1, 100, 512] 3,768,320 376,832,000
275275│ └─weight_ih_l0 [2048, 300] ├─614,400
@@ -280,7 +280,7 @@ LSTMNet -- --
280280│ └─weight_hh_l1 [2048, 512] ├─1,048,576
281281│ └─bias_ih_l1 [2048] ├─2,048
282282│ └─bias_hh_l1 [2048] └─2,048
283- ├─Linear (decoder) [512, 20] [1, 100, 20] 10,260 10,260
283+ ├─Linear (decoder) -- [1, 100, 20] 10,260 10,260
284284│ └─weight [512, 20] ├─10,240
285285│ └─bias [20] └─20
286286========================================================================================================================
@@ -312,7 +312,7 @@ summary(model, (1, 3, 224, 224), depth=3)
312312==========================================================================================
313313Layer (type:depth-idx) Output Shape Param #
314314==========================================================================================
315- ResNet -- --
315+ ResNet [1, 1000] --
316316├─Conv2d: 1-1 [1, 64, 112, 112] 9,408
317317├─BatchNorm2d: 1-2 [1, 64, 112, 112] 128
318318├─ReLU: 1-3 [1, 64, 112, 112] --
@@ -430,18 +430,18 @@ summary(ContainerModule(), (1, 5))
430430==========================================================================================
431431Layer (type:depth-idx) Output Shape Param #
432432==========================================================================================
433- ContainerModule -- --
433+ ContainerModule [1, 5] --
434434├─ModuleList: 1-1 -- --
435435│ └─Linear: 2-1 [1, 5] 30
436436│ └─ContainerChildModule: 2-2 [1, 5] --
437437│ │ └─Sequential: 3-1 [1, 5] --
438438│ │ │ └─Linear: 4-1 [1, 5] 30
439439│ │ │ └─Linear: 4-2 [1, 5] 30
440440│ │ └─Linear: 3-2 [1, 5] 30
441- │ │ └─Sequential: 3 -- --
441+ │ │ └─Sequential: 3-3 -- (recursive)
442442│ │ │ └─Linear: 4-3 [1, 5] (recursive)
443443│ │ │ └─Linear: 4-4 [1, 5] (recursive)
444- │ │ └─Sequential: 3-3 [1, 5] (recursive)
444+ │ │ └─Sequential: 3-4 [1, 5] (recursive)
445445│ │ │ └─Linear: 4-5 [1, 5] (recursive)
446446│ │ │ └─Linear: 4-6 [1, 5] (recursive)
447447│ │ │ └─Linear: 4-7 [1, 5] (recursive)
0 commit comments