from local

This commit is contained in:
dohe0342 2023-01-08 17:59:42 +09:00
parent b721e02fe1
commit 6e27993921
2 changed files with 3 additions and 1 deletions

View File

@ -971,8 +971,10 @@ def run(rank, world_size, args):
for n, p in model.named_parameters(): for n, p in model.named_parameters():
if 'layer' not in n: if 'layer' not in n:
p.data = pre_trained_model[n] try: p.data = pre_trained_model[n]
except: print(f'pre-trained model has no parameterd named {n}.')
else: else:
print(n) print(n)
exit() exit()