NVIDIA-AI-IOT / torch2trt

An easy to use PyTorch to TensorRT converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SyntaxWarning of dataset.py:61

grapevine-AI opened this issue · comments

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.

commented

Good catch!

Will try to test the fix soon.