[SyntaxError]
See original GitHub issueHi, I just installed the latest version on a GCP instance with python 3.5 and got this error. It’s odd as it works on my local machine with python 3.7.
from torchsummary import summary
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py", line 3326, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-1-bac45dd5d4db>", line 6, in <module>
from torchsummary import summary
File "/home/michalnarbutt/.local/lib/python3.5/site-packages/torchsummary/__init__.py", line 1, in <module>
from .torchsummary import summary
File "/home/michalnarbutt/.local/lib/python3.5/site-packages/torchsummary/torchsummary.py", line 30
**kwargs: Any,
^
SyntaxError: invalid syntax
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
SyntaxError - JavaScript - MDN Web Docs
The SyntaxError object represents an error when trying to interpret syntactically invalid code. It is thrown when the JavaScript engine encounters tokens or ......
Read more >How to Handle the Syntax Error in Javascript
The Javascript SyntaxError occurs when trying to interpret code that is not syntactically valid. It is thrown when the Javascript engine ...
Read more >Syntax error - Wikipedia
In computer science, a syntax error is an error in the syntax of a sequence of characters or tokens that is intended to...
Read more >Invalid Syntax in Python: Common Reasons for SyntaxError
If you've ever received a SyntaxError when trying to run your Python code, then this guide can help you. Throughout this tutorial, you'll...
Read more >Ruby's SyntaxError Exception
SyntaxError. You shall not pass! Ruby's SyntaxError class. Raised when encountering Ruby code with an invalid syntax. eval("1+1=2"). raises the exception:
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

I added this feature to the newest release: 1.3.1 Please open a new issue if there are any problems with the mult-add calculation.
Thankyou very much. The new upgrade works!!! Actually it is much easier to point out errors than to just point out errors.
I tried the verbose=2 and even thats work. However at this stage can I request one additional feature?
When printing the summary can you please tweak the code to print total number of Mult-add. Yes the verbose=2 gives layer wise display I do not want to add them using calculator. After the layer wise breakdown can the code automatically add the Mult-add operations and display them just like https://github.com/sovrasov/flops-counter.pytorch does.
Thankyou anyways