pretrained-models.pytorch icon indicating copy to clipboard operation
pretrained-models.pytorch copied to clipboard

SyntaxWarning in `pretrainedmodels/models/dpn`

Open shaharma93 opened this issue 8 months ago • 2 comments

I get

 <python_path>site-packages/pretrainedmodels/models/dpn.py:255: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if block_type is 'proj':

I get this warning in the following lines: 255, 258, 262 Is there a reason to use is and not ==? I think comparing strings with == is indeed more elegant..

shaharma93 avatar Apr 15 '25 11:04 shaharma93

您的邮件已收到!

Fzz123 avatar Apr 15 '25 11:04 Fzz123

I opened a pull request https://github.com/Cadene/pretrained-models.pytorch/pull/236

shaharma93 avatar Apr 15 '25 11:04 shaharma93