yolo中断训练功能添加

This commit is contained in:
2022-11-15 17:59:06 +08:00
parent b70ba8a431
commit cdb081654a
4 changed files with 46 additions and 8 deletions

27
app/configs/global_var.py Normal file
View File

@ -0,0 +1,27 @@
"""
@Time 2022/11/15 10:13
@Auth
@File global_var.py
@IDE PyCharm
@MottoABC(Always Be Coding)
@Desc
"""
def _init(): # 初始化
global _global_dict
_global_dict = {}
def set_value(key, value):
# 定义一个全局变量
_global_dict[key] = value
def get_value(key):
# 获得一个全局变量,不存在则提示读取对应变量失败
try:
return _global_dict[key]
except:
print('读取' + key + '失败\r\n')