Skip to content

Commit a65fca1

Browse files
committed
fix resnet
1 parent b8c7497 commit a65fca1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

torchsat/models/classification/resnet.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ def _resnet(arch, block, layers, pretrained, progress, num_classes, in_channels,
221221
state_dict = load_state_dict_from_url(model_urls[arch], progress=progress)
222222
model.load_state_dict(state_dict)
223223
if in_channels==3:
224+
model.fc = nn.Linear(model.fc.in_features, num_classes)
224225
return model
225226

226227
conv1 = model.conv1

0 commit comments

Comments
 (0)