prlz77 / ResNeXt.pytorch

Reproduces ResNet-V3 with pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The structure problem

Snowball0823 opened this issue · comments

self.stage_1 = self.block('stage_1', self.stages[0], self.stages[1], 1)
self.stage_2 = self.block('stage_2', self.stages[1], self.stages[2], 2)
self.stage_3 = self.block('stage_3', self.stages[2], self.stages[3], 2)
self.classifier = nn.Linear(self.stages[3], nlabels)
.
.
.
for bottleneck in range(self.block_depth):
name_ = '%s_bottleneck_%d' % (name, bottleneck)
if bottleneck == 0:
block.add_module(name_, ResNeXtBottleneck(in_channels, out_channels, pool_stride, self.cardinality,
self.base_width, self.widen_factor))
else:
block.add_module(name_,
ResNeXtBottleneck(out_channels, out_channels, 1, self.cardinality, self.base_width,
self.widen_factor))
The structure of net is strange
I see the Lua source code, it seems that there should have a maxpooling before stage_1? And the source code use the resnet structure to build the resneXt, but in your code, you use the same block number in every stage, but the resnet use four layers and use different block number in every layer, and there only have three stage, so is this the mistake?