Skip to content

Conversation

@lancelotblanchard
Copy link

As reported in issue #355, LayerInfo.get_kernel_size raises a TypeError: iteration over a 0-d tensor when the kernel_size of a module is a tensor with only one item. This happens for some model implementations from the transformers library (e.g., EncodecConv1d, MimiConv1d)

This fixes the issue by modifying get_kernel_size to turn the kernel_size of a module into a list, only if it is not a 0-d tensor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant