Skip to content

Commit 54be5de

Browse files
hoonyyhoonglenn-jocher
authored andcommitted
Add torch nn
1 parent 769e923 commit 54be5de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import numpy as np
1212
import torch.distributed as dist
1313
import torch.nn.functional as F
14+
import torch.nn as nn
1415
import torch.optim as optim
1516
import torch.optim.lr_scheduler as lr_scheduler
1617
import torch.utils.data
@@ -103,7 +104,6 @@ def train(hyp, opt, device, tb_writer=None, wandb=None):
103104
for k, v in model.named_parameters():
104105
v.requires_grad = True
105106

106-
107107
if opt.adam:
108108
optimizer = optim.Adam(pg0, lr=hyp['lr0'], betas=(hyp['momentum'], 0.999)) # adjust beta1 to momentum
109109
else:

0 commit comments

Comments
 (0)