"...resnet50_tensorflow.git" did not exist on "5794633712dddb2049df073bb98809376504fb10"
Commit cd30565a authored by nhatchan's avatar nhatchan
Browse files

Fix importing unofficial TF models

Importing unofficial TF models seems to be working well, at least for me.
This PR resolves #50.
parent 35becc6d
...@@ -50,7 +50,7 @@ def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_config_file, pytor ...@@ -50,7 +50,7 @@ def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_config_file, pytor
name = name.split('/') name = name.split('/')
# adam_v and adam_m are variables used in AdamWeightDecayOptimizer to calculated m and v # adam_v and adam_m are variables used in AdamWeightDecayOptimizer to calculated m and v
# which are not required for using pretrained model # which are not required for using pretrained model
if any(n in ["adam_v", "adam_m"] for n in name): if any(n in ["adam_v", "adam_m", "global_step"] for n in name):
print("Skipping {}".format("/".join(name))) print("Skipping {}".format("/".join(name)))
continue continue
pointer = model pointer = model
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment