From 443c73ebe60f57edb0b75eae8940c38408a770dd Mon Sep 17 00:00:00 2001 From: Vasilis Vryniotis Date: Wed, 17 Aug 2022 12:17:58 +0100 Subject: [PATCH] Fix minor bug on `PolynomialLR` invocation Resolves issue reported at https://github.com/pytorch/vision/commit/6e535db255cee3ce878dd7a54dda01d4ec8932c1#commitcomment-81409388 There seems to be a misspelling on the name of the parameter. This PR updates `total_steps` to `total_iters` which is the correct argument. --- references/segmentation/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/references/segmentation/train.py b/references/segmentation/train.py index 1945ad1f4a2..bb57e65b801 100644 --- a/references/segmentation/train.py +++ b/references/segmentation/train.py @@ -186,7 +186,7 @@ def main(args): iters_per_epoch = len(data_loader) main_lr_scheduler = PolynomialLR( - optimizer, total_steps=iters_per_epoch * (args.epochs - args.lr_warmup_epochs), power=0.9 + optimizer, total_iters=iters_per_epoch * (args.epochs - args.lr_warmup_epochs), power=0.9 ) if args.lr_warmup_epochs > 0: