mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-04 14:44:18 +00:00
explicitly convert model_avg to cpu
This commit is contained in:
parent
c3bb03253f
commit
ae50acad8b
@ -867,6 +867,10 @@ def run(rank, world_size, args):
|
||||
model = DDP(model, device_ids=[rank])
|
||||
model.device = device
|
||||
|
||||
if rank == 0:
|
||||
model_avg = 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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user