Skip to content

Commit ad24d62

Browse files
authored
Update models.py
fix bugs
1 parent f752e81 commit ad24d62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ def __init__(self, model_name, num_classes, in_channel=300, t1=0.0, t2=0.0, adj_
6161
model.layer3,
6262
model.layer4,
6363
)
64-
self.add_module('backbone' + str(i), backbone)
64+
self.add_module('backbone' + str(i+1), backbone)
6565
self.backbones.append(backbone)
6666
pooling = nn.MaxPool2d(14, 14)
67-
self.add_module('pooling' + str(i), pooling)
67+
self.add_module('pooling' + str(i+1), pooling)
6868
self.poolings.append(pooling)
6969

7070
self.num_classes = num_classes

0 commit comments

Comments
 (0)