title: Pytorch Model Summary
body: <p>I am trying to load a pytorch model using:</p>
  <pre><code>model = torch.load('/content/gdrive/model.pth.tar', map_location='cpu')
  </code></pre>
  <p>I want to check the model summary. When I try:</p>
  <pre><code>print(model)
  </code></pre>
  <p>I get the following output:</p>
  <pre><code>{'state_dict': {'model.conv1.weight': tensor([[[[ 2.0076e-02,  1.5264e-02, -1.2309e-02,  ..., -4.0222e-02,
             -4.0527e-02, -6.4458e-02],
            [ 6.3291e-03,  3.8393e-03,  1.2400e-02,  ..., -3.3926e-03,
             -2.1063e-02, -3.4743e-02],
            [ 1.9969e-02,  2.0064e-02,  1.4004e-02,  ...,  8.7359e-02,
              5.4801e-02,  4.8791e-02],
            ...,
            [ 2.5362e-02,  1.1433e-02, -7.6776e-02,  ..., -3.4798e-01,
             -2.7198e-01, -1.2066e-01],
            [ 8.0373e-02,  1.3095e-01,  1.4240e-01,  ..., -2.2933e-03,
             -1.0469e-01, -1.0922e-01],
            [-1.1147e-03,  7.4572e-02,  1.2814e-01,  ...,  1.6903e-01,
              1.0619e-01,  2.4744e-02]], 
        'model.layer4.1.bn2.running_var': tensor([0.0271, 0.0155, 0.0199, 0.0198, 0.0132, 0.0148, 0.0182, 0.0170, 0.0134,
  .
  .
  .
  
  </code></pre>
  <p>What does it even mean?</p>
  <p>I also tried to use:</p>
  <pre><code>from torchsummary import summary
  summary(model, input_size=(3, 224, 224))
  </code></pre>
  <p>But it gives me the following error:</p>
  <pre><code>---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-31-ca828d30bd38&gt; in &lt;module&gt;()
        1 from torchsummary import summary
  ----&gt; 2 summary(model, input_size=(3, 224, 224))
  
  /usr/local/lib/python3.7/dist-packages/torchsummary/torchsummary.py in summary(model, input_size, batch_size, device)
       66 
       67     # register hook
  ---&gt; 68     model.apply(register_hook)
       69 
       70     # make a forward pass
  
  AttributeError: 'dict' object has no attribute 'apply'
  </code></pre>
  <p>Please note that model is a custom model that I am trying to load.
  How can I get a model summary in Pytorch?</p>