question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, 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:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
TylerYepcommented, May 25, 2020

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.

1reaction
MohitLamba94commented, May 21, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found