--------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
~/anaconda3/envs/pytorch/lib/python3.8/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):
~/.local/lib/python3.8/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-94-b91d7160d82c> in forward(self, x)
11 def forward(self, x):
---> 12 x = self.pool(F.relu(self.conv1(x)))
13 # x = self.pool(F.relu(self.conv2(x)))
~/.local/lib/python3.8/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(
~/.local/lib/python3.8/site-packages/torch/nn/modules/conv.py in forward(self, input)
422 def forward(self, input: Tensor) -> Tensor:
--> 423 return self._conv_forward(input, self.weight)
424
~/.local/lib/python3.8/site-packages/torch/nn/modules/conv.py in _conv_forward(self, input, weight)
418 _pair(0), self.dilation, self.groups)
--> 419 return F.conv2d(input, weight, self.bias, self.stride,
420 self.padding, self.dilation, self.groups)
RuntimeError: expected stride to be a single integer value or a list of 1 values to match the convolution dimensions, but got stride=[1, 1]
The above exception was the direct cause of the following exception:
RuntimeError Traceback (most recent call last)
<ipython-input-97-f52bda561c0c> in <module>
----> 1 summary(net,(1,1,28,28))
~/anaconda3/envs/pytorch/lib/python3.8/site-packages/torchinfo/torchinfo.py in summary(model, input_size, input_data, batch_dim, col_names, col_width, depth, device, dtypes, verbose, **kwargs)
167 except Exception as e:
168 executed_layers = [layer for layer in summary_list if layer.executed]
--> 169 raise RuntimeError(
170 "Failed to run torchinfo. See above stack traces for more details. "
171 f"Executed layers up to: {executed_layers}"
RuntimeError: Failed to run torchinfo. See above stack traces for more details. Executed layers up to: []