Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxWarning of dataset.py:61 #930

Open
grapevine-AI opened this issue May 31, 2024 · 1 comment
Open

SyntaxWarning of dataset.py:61 #930

grapevine-AI opened this issue May 31, 2024 · 1 comment

Comments

@grapevine-AI
Copy link

Hello.

SyntaxWarning appeared when I imported torch2trt.

C:\DeepLearning\torch2trt-master\torch2trt\dataset.py:61: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert(len(self) > 0, 'Cannot create default flattener without input data.')

I think that you aim not assert(len(self) > 0, 'Cannot create default flattener without input data.') but assert len(self) > 0, 'Cannot create default flattener without input data.'.

Please review.

@jaybdub
Copy link
Contributor

jaybdub commented Jun 7, 2024

Good catch!

Will try to test the fix soon.

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

No branches or pull requests

2 participants