From da8287b7e80665383c266b878d24ec10e0e90ffd Mon Sep 17 00:00:00 2001 From: rubberhead Date: Sun, 3 Mar 2024 22:39:30 +0000 Subject: [PATCH] FIX: deprecated loss reduction argument --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 5dd5958..b79dc6e 100644 --- a/train.py +++ b/train.py @@ -148,7 +148,7 @@ def worker(rank: int, args: Namespace): model = model.cuda() # criterion, optimizer, scheduler - criterion = nn.L1Loss(size_average=False) + criterion = nn.L1Loss(reduction="sum") if device is not None: criterion = criterion.to(device) elif torch.cuda.is_available():