-
Couldn't load subscription status.
- Fork 132
Open
Description
Describe the bug
get_nernel_size raise a TypeError: iteration over a 0-d tensor, when the k(kernel_size) is a tensor with only one item。
To Reproduce
#pip install torchinfo ==1.8.0
#pip install transformers == 4.49.0
from torchinfo import summary
from transformers import MimiModel
summary(MimiModel.from_pretrained("kyutai/mimi"), input_size=(1,1,32000))
Expected behavior
show the model structure
Screenshots
Desktop (please complete the following information):
- OS: ubuntu 22.04
Additional context
When k is a tensor with only one item, it is also Iterable
if isinstance(k, Iterable):
kernel_size = list(k)
Metadata
Metadata
Assignees
Labels
No labels
