Skip to content

Commit 616b0f9

Browse files
authored
Update transfer_learning_tutorial.py
1 parent 905eaf0 commit 616b0f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beginner_source/transfer_learning_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def optim_scheduler_ft(model, epoch, init_lr=0.001, lr_decay_epoch=7):
297297
param.requires_grad = False
298298

299299
# Parameters of newly constructed modules have requires_grad=True by default
300-
model.fc = nn.Linear(512, 100)
300+
model.fc = nn.Linear(512, 2)
301301

302302
if use_gpu:
303303
model = model.cuda()

0 commit comments

Comments
 (0)