Skip to content

Commit

Permalink
Merge pull request Haochen-Wang409#55 from ksh3490/patch-1
Browse files Browse the repository at this point in the history
update sync_bn judgement
  • Loading branch information
Haochen-Wang409 authored Jun 16, 2022
2 parents 5784b29 + d391828 commit d2367ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion train_semi.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def main():
else:
modules_head = [model.decoder]

if cfg.get("sync_bn", True):
if cfg["net"].get("sync_bn", True):
model = torch.nn.SyncBatchNorm.convert_sync_batchnorm(model)

model.cuda()
Expand Down
2 changes: 1 addition & 1 deletion train_sup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def main():
else:
modules_head = [model.decoder]

if cfg.get("sync_bn", True):
if cfg["net"].get("sync_bn", True):
model = torch.nn.SyncBatchNorm.convert_sync_batchnorm(model)

model.cuda()
Expand Down

0 comments on commit d2367ed

Please sign in to comment.