summary() missing 8 required keyword-only arguments
See original GitHub issueHello, I am trying to use summary() on a simple CNN function. However, I get the following TypeError:
TypeError: summary() missing 8 required keyword-only arguments: 'batch_dim', 'branching', 'col_names', 'col_width', 'depth', 'device', 'dtypes', and 'verbose'
I am using:
from torchsummary import summary
model = CNN().to(device)
summary(model, (3, 96, 96))
What is the correct execution?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Missing 1 Required Keyword-Only Argument - Stack Overflow
You have defined a function with a variable amount of positional arguments, *rel_change , which can only ever be followed by keyword only...
Read more >Keyword-only function arguments - Python Morsels
Let's define a function that accepts a keyword-only argument. ... The error says that greet is missing one required keyword-only argument ...
Read more >Missing keyword only argument : r/Discord_Bots - Reddit
Came back to a program I havent touched for a week and when I run it I get TypeError: Client.__init__() missing 1 required...
Read more >Keyword-only Arguments in Python - Medium
In this scenario, we just give the function a positional argument for ... You're missing 1 required keyword-only argument: separator.
Read more >python function arguments - Pythoneasy
Keyword arguments allow us to match by name, instead of by position. def company(name, year, state, country): ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Well, this is confusing. I restarted the kernel once again and it worked just fine:
I am not sure what happened since I already restarted the kernel a few times. Thank you for your help! Best regards.
Yeah, it should be
(3, 28, 28). I changed it here, but the error persists. I’m still updating my environment to Python 3.8.