Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit f7cc6a6

Browse files
abhinavnmagicbfineran
authored andcommitted
Fix referenced before assignment error (#1340)
1 parent eb5a02c commit f7cc6a6

File tree

1 file changed

+2
-0
lines changed
  • src/sparseml/pytorch/torchvision

1 file changed

+2
-0
lines changed

src/sparseml/pytorch/torchvision/train.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ def collate_fn(batch):
389389
device=device,
390390
num_classes=num_classes,
391391
)
392+
else:
393+
distill_teacher = args.distill_teacher
392394

393395
if args.distributed and args.sync_bn:
394396
model = torch.nn.SyncBatchNorm.convert_sync_batchnorm(model)

0 commit comments

Comments
 (0)