@ptrblck i got another issue!!

from torchinfo import summary
batch_size = 32
summary(m1, input_size=(32, 1, 187))

I am getting
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/torchinfo/torchinfo.py in summary(model, input_size, input_data, batch_dim, col_names, col_width, depth, device, dtypes, verbose, **kwargs)
    159                 if isinstance(x, (list, tuple)):
--> 160                     _ = model.to(device)(*x, **kwargs)
    161                 elif isinstance(x, dict):

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
    726         else:
--> 727             result = self.forward(*input, **kwargs)
    728         for hook in itertools.chain(

<ipython-input-49-26860265b2db> in forward(self, input)
     36         x = self.conv2(x)
---> 37         x, _ = self.rnn_layer(x)
     38         x = self.avgpool(x)

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
    726         else:
--> 727             result = self.forward(*input, **kwargs)
    728         for hook in itertools.chain(

<ipython-input-48-c383aa5a9c6e> in forward(self, input)
     33     def forward(self, input):
---> 34         outputs, hidden_states = self.rnn_layer(input)
     35         return outputs, hidden_states

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
    730                 self._forward_hooks.values()):
--> 731             hook_result = hook(self, input, result)
    732             if hook_result is not None:

/opt/conda/lib/python3.7/site-packages/torchsummary/torchsummary.py in hook(module, input, output)
     22                 summary[m_key]["output_shape"] = [
---> 23                     [-1] + list(o.size())[1:] for o in output
     24                 ]

/opt/conda/lib/python3.7/site-packages/torchsummary/torchsummary.py in <listcomp>(.0)
     22                 summary[m_key]["output_shape"] = [
---> 23                     [-1] + list(o.size())[1:] for o in output
     24                 ]

AttributeError: 'tuple' object has no attribute 'size'

The above exception was the direct cause of the following exception:

RuntimeError                              Traceback (most recent call last)
<ipython-input-101-d16bdb924f0b> in <module>
      1 from torchinfo import summary
      2 batch_size = 32
----> 3 summary(m1, input_size=(32, 1, 187))

/opt/conda/lib/python3.7/site-packages/torchinfo/torchinfo.py in summary(model, input_size, input_data, batch_dim, col_names, col_width, depth, device, dtypes, verbose, **kwargs)
    170                 "Failed to run torchinfo. See above stack traces for more details. "
    171                 f"Executed layers up to: {executed_layers}"
--> 172             ) from e
    173         finally:
    174             if hooks is not None:

RuntimeError: Failed to run torchinfo. See above stack traces for more details. Executed layers up to: [ConvNormPool: 1-1, Conv1d: 2-1, BatchNorm1d: 2-2, Swish: 2-3, Conv1d: 2-4, BatchNorm1d: 2-5, Swish: 2-6, Conv1d: 2-7, BatchNorm1d: 2-8, Swish: 2-9, MaxPool1d: 2-10, ConvNormPool: 1-2, Conv1d: 2-11, BatchNorm1d: 2-12, Swish: 2-13, Conv1d: 2-14, BatchNorm1d: 2-15, Swish: 2-16, Conv1d: 2-17, BatchNorm1d: 2-18, Swish: 2-19, MaxPool1d: 2-20]


Pls help me resolve this issue!!Its important!