from local

This commit is contained in:
dohe0342 2023-01-09 22:48:42 +09:00
parent 9af1c4234f
commit d942cecf20
2 changed files with 4 additions and 3 deletions

View File

@ -980,9 +980,10 @@ def run(rank, world_size, args):
load_checkpoint(path, transducer_model) load_checkpoint(path, transducer_model)
except: except:
path = '/home/work/workspace/icefall/egs/librispeech/ASR/incremental_transf/conformer_12layers.pt' path = '/home/work/workspace/icefall/egs/librispeech/ASR/incremental_transf/conformer_12layers.pt'
pre_trained_model = pre_trained_model['model'] load_checkpoint(path, transducer_model)
transducer_model.load_state_dict(pre_trained_model, strict=True) #pre_trained_model = pre_trained_model['model']
transducer_model.to(device) #transducer_model.load_state_dict(pre_trained_model, strict=True)
#transducer_model.to(device)
model = get_interformer_model(transducer_model.encoder, params) model = get_interformer_model(transducer_model.encoder, params)
for n, p in model.named_parameters(): for n, p in model.named_parameters():