fix variable typo
This commit is contained in:
parent
a9fed7c364
commit
92e173d414
1 changed files with 2 additions and 2 deletions
|
@ -178,7 +178,7 @@ def select_checkpoint():
|
||||||
return checkpoint_info
|
return checkpoint_info
|
||||||
|
|
||||||
|
|
||||||
chckpoint_dict_replacements = {
|
checkpoint_dict_replacements = {
|
||||||
'cond_stage_model.transformer.embeddings.': 'cond_stage_model.transformer.text_model.embeddings.',
|
'cond_stage_model.transformer.embeddings.': 'cond_stage_model.transformer.text_model.embeddings.',
|
||||||
'cond_stage_model.transformer.encoder.': 'cond_stage_model.transformer.text_model.encoder.',
|
'cond_stage_model.transformer.encoder.': 'cond_stage_model.transformer.text_model.encoder.',
|
||||||
'cond_stage_model.transformer.final_layer_norm.': 'cond_stage_model.transformer.text_model.final_layer_norm.',
|
'cond_stage_model.transformer.final_layer_norm.': 'cond_stage_model.transformer.text_model.final_layer_norm.',
|
||||||
|
@ -186,7 +186,7 @@ chckpoint_dict_replacements = {
|
||||||
|
|
||||||
|
|
||||||
def transform_checkpoint_dict_key(k):
|
def transform_checkpoint_dict_key(k):
|
||||||
for text, replacement in chckpoint_dict_replacements.items():
|
for text, replacement in checkpoint_dict_replacements.items():
|
||||||
if k.startswith(text):
|
if k.startswith(text):
|
||||||
k = replacement + k[len(text):]
|
k = replacement + k[len(text):]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue