Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
sml2h3 committed Feb 26, 2022
1 parent 0be0569 commit 9dedc81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(self, project_name: str):

self.resize = [int(self.conf['Model']['ImageWidth']), int(self.conf['Model']['ImageHeight'])]
self.word = self.conf['Model']['Word']
self.ImageChannel = self.conf['Model']['ImageChannel']
logger.info("\nTaget:\nmin_Accuracy: {}\nmin_Epoch: {}\nmax_Loss: {}".format(self.target_acc, self.min_epoch,
self.max_loss))

Expand Down Expand Up @@ -147,7 +148,7 @@ def start(self):
time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime(self.now_time))))
, input_names, output_names, dynamic_ax)
with open(os.path.join(self.models_path, "charsets.json"), 'w', encoding="utf-8") as f:
f.write(json.dumps({"charset": self.net.charset, "image": self.resize, "word": self.word}, ensure_ascii=False))
f.write(json.dumps({"charset": self.net.charset, "image": self.resize, "word": self.word, 'channel': self.ImageChannel}, ensure_ascii=False))
logger.info("\nExport Finished!Using Time: {}min".format(
str(int(int(self.now_time) - int(self.start_time)) / 60)))
exit()
Expand Down

0 comments on commit 9dedc81

Please sign in to comment.