"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "b4cacb7a63473b527e3c723576bba81611bc3b16"
Commit 41089bc7 authored by Chris's avatar Chris
Browse files

added file to convert pytorch->tf

parent 0a8b4d65
...@@ -121,11 +121,11 @@ if __name__ == "__main__": ...@@ -121,11 +121,11 @@ if __name__ == "__main__":
default=None, default=None,
type=str, type=str,
required=True, required=True,
help="path to a folder in which the TF model will be cached.") help="Path to a folder in which the TF model will be cached.")
args = parser.parse_args() args = parser.parse_args()
model = BertModel( model = BertModel(
config=BertConfig(args.config_file_path) config=BertConfig(args.config_file_path)
).from_pretrained(args.pretrained_model_name_or_path) ).from_pretrained(args.pretrained_model_name_or_path)
convert_hf_checkpoint_to_tf(model=model, ckpt_dir=args.cache_) convert_hf_checkpoint_to_tf(model=model, ckpt_dir=args.cache_dir)
\ No newline at end of file \ No newline at end of file
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