clovaai / EXTD_Pytorch

Official EXTD Pytorch code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the purpose of these lines of code?

kyn0v opened this issue · comments

commented

if cnt>1:
if i == n - 1: # reduce the featuremap in the last.
self.features.append(block_dwc(input_channel, output_channel, s, expand_ratio=t))
else:
self.features.append(block_dwc(input_channel, output_channel, 1, expand_ratio=t))
input_channel = output_channel
else:
if i == n - 1: # reduce the featuremap in the last.
self.features.append(block_dwc(input_channel, output_channel, s, expand_ratio=t))
else:
self.features.append(block_dwc(input_channel, output_channel, 1, expand_ratio=t))
input_channel = output_channel

Hello, this conditional statement seems like making no sense. I am not sure that whether the author set it like this deliberately, or there is something wrong with these lines of code.

Ohh Thank you for the comment.
'If cnt >1 else ' statement is useless as you pointed out (same operations work).
It is the trace of the old trials.
We will revise this in the next upcoming large update.

commented

thank you for your reply, I got it.