torchinfo
torchinfo copied to clipboard
View model summaries in PyTorch!
TL;DR: I just want the library to show model's parameters only and stop showing the "recursive" rows in sequential models such as LSTM, GRU, loop-based models. For loop-based models such...
when I use this tool with mmdetection, ``` model = init_detector(config_file, checkpoint_file, device='cuda:0') summary(model, (1, 3, 1333, 800)) ``` There is such an error ``` Traceback (most recent call last):...
**Describe the bug** Pytorch 1.12 - torchvision - NonDynamicallyQuantizableLinear Not producing input/output shapes for this layer. I have pasted sample code and sample output below ```python class MultiheadAttentionWrapper(torch.nn.Module): def __init__(self,...
I use `torchinfo` to get a rough understanding of model sizes and how the "weight" is distributed across the model. Unfortunately, the latter information is not available directly, which is...
**Describe the bug** The total number of parameters show by summary function is different from what is shown on model card over huggingface website. **To Reproduce** ```python from transformers import...
**Describe the bug** I have a custom TextVectorization layer, it doesn't use any `nn.` layers, it's just a dictionary of words that is used to fill in a `torch.zeros` vector....
**Describe the bug** Using batch_first=True for torch native transformer blocks seem to result in non-complete summaries. When setting batch_ffirst=False, it looks good. **To Reproduce** Steps to reproduce the behavior: encoder_layer...
The best way to explain this PR is to show an example before and after: Before: ``` =============================================================================================== Layer (type:depth-idx) Output Shape Param # =============================================================================================== GenotypeNetwork -- -- ├─Sequential: 1-1...
**Describe the bug** torchinfo.py", line 448, in traverse_input_data result = aggregate( TypeError: unsupported operand type(s) for +: 'int' and 'str' It seems like the torchinfo.py cannot mix the different model...
**Describe the bug** I'm using torchinfo summary to see the number of parameters of UNet in Stable-Diffusion-2, but find it unmatch what is reported publicly. **To Reproduce** ```python from diffusers...