From a72048be3e7b942946de5bc245d4e52043cb0a33 Mon Sep 17 00:00:00 2001 From: yaozengwei Date: Fri, 6 May 2022 15:58:52 +0800 Subject: [PATCH] remove device convertion for model_avg --- egs/librispeech/ASR/pruned_transducer_stateless4/train.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless4/train.py b/egs/librispeech/ASR/pruned_transducer_stateless4/train.py index 2f2fbd838..cc61b3b32 100755 --- a/egs/librispeech/ASR/pruned_transducer_stateless4/train.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless4/train.py @@ -867,10 +867,6 @@ def run(rank, world_size, args): model = DDP(model, device_ids=[rank]) model.device = device - if rank == 0: - model_avg.to(torch.device("cpu")) - model_avg.device = device - optimizer = Eve(model.parameters(), lr=params.initial_lr) scheduler = Eden(optimizer, params.lr_batches, params.lr_epochs)