SyntaxWarning of dataset.py:61
grapevine-AI opened this issue · comments
grapevine-AI commented
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.
John commented
Good catch!
Will try to test the fix soon.