"ppocr/git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "2814d997a440cc3f620956e5f3e4fd38dddd15c0"
Commit 40acf6b5 authored by Chi-Liang Liu's avatar Chi-Liang Liu Committed by Julien Chaumond
Browse files

don't save model without training

parent 189ff9b6
......@@ -481,7 +481,7 @@ def main():
# Save the trained model and the tokenizer
if args.local_rank == -1 or torch.distributed.get_rank() == 0:
if args.do_train and args.local_rank == -1 or torch.distributed.get_rank() == 0:
# Create output directory if needed
if not os.path.exists(args.output_dir) and args.local_rank in [-1, 0]:
os.makedirs(args.output_dir)
......
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