提交 a6aa3874 编写于 作者: 若苗瞬's avatar 若苗瞬 😶

mod: delete loss history and set iter to 1, must be done at same time, or bad thing happened...

mod: do not delete preview, no point.
上级 72d80f82
......@@ -2,6 +2,7 @@ from distutils.util import strtobool
import os
import pickle
from pathlib import Path
import platform
import sys
print()
......@@ -53,26 +54,21 @@ MOption = pickle.loads(MContent)
isModified = False
key = input("Please enter 'Y' to delete all loss history and previews: ")
key = input("Please enter 'Y' to delete loss history and set iteration to 1: ")
if key.upper() == 'Y':
print("Clearing all loss history.")
print("Clearing loss history.")
MOption['loss_history'].clear()
isModified = True
print()
key = input("Please enter 'Y' to delete sample previews: ")
if key.upper() == 'Y':
print("Clearing all previews.")
MOption['sample_for_preview'].clear()
isModified = True
print()
key = input("Please enter 'Y' to reset iteration to 1: ")
if key.upper() == 'Y':
print("Resetting iteration to 1.")
MOption['iter'] = 1
isModified = True
# print()
# key = input("Please enter 'Y' to delete sample previews: ")
# if key.upper() == 'Y':
# print("Clearing all previews.")
# MOption['sample_for_preview'].clear()
# isModified = True
print()
print("Press any key to next step...")
input()
......@@ -82,7 +78,10 @@ while True:
# print(MOption['options'])
# 分行逐个打印参数。
os.system('cls')
if platform.platform(True, True)[0:3].lower() == "win":
os.system('cls')
else:
os.system('clear')
print("["+DFLModelOptionF+"]")
print()
print(str(" model info ").center(53,"*"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册