Skip to content

Commit 50cdd70

Browse files
authored
Merge pull request tusen-ai#35 from joyhuang9473/fix-hard-coding-with-num-of-branch-setting
Fix hard coding with num_branch setting
2 parents a80c0b6 + 31337d6 commit 50cdd70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/tridentnet/resnet_v2_for_paper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def resnet_trident_stage(cls, data, name, num_block, filter, stride, dilate, nor
200200
unit_deform = False
201201
# cast back to fp32 as deformable conv is not optimized for fp16
202202
if unit_deform and i == num_block - 2:
203-
for j in range(3):
203+
for j in range(num_branch):
204204
data[j] = X.to_fp32(data[j], name="deform_to32")
205205
data = cls.resnet_trident_unit(
206206
data, "{}_unit{}".format(name, i), filter, (1, 1), d, False, norm_type, norm_mom, ndev,

0 commit comments

Comments
 (0)