训练核心显示修改

This commit is contained in:
JIAKUNHAO 2022-11-18 14:28:10 +08:00
parent 2dac2a6a79
commit 474510b176

View File

@ -372,17 +372,17 @@ def Export_model_RODY(params_str):
@obtain_train_param() @obtain_train_param()
def returnTrainParams(): def returnTrainParams():
# nvmlInit() nvmlInit()
# gpuDeviceCount = nvmlDeviceGetCount() # 获取Nvidia GPU块数 gpuDeviceCount = nvmlDeviceGetCount() # 获取Nvidia GPU块数
# _kernel = [f"cuda:{a}" for a in range(gpuDeviceCount)] _kernel = [f"cuda:{a}" for a in range(gpuDeviceCount)]
params_list = [ params_list = [
{"index": 0, "name": "epochnum", "value": 10, "description": '训练轮次', "default": 100, "type": "I", 'show': True}, {"index": 0, "name": "epochnum", "value": 10, "description": '训练轮次', "default": 100, "type": "I", 'show': True},
{"index": 1, "name": "batch_size", "value": 4, "description": '批次图像数量', "default": 1, "type": "I", {"index": 1, "name": "batch_size", "value": 4, "description": '批次图像数量', "default": 1, "type": "I",
'show': True}, 'show': True},
{"index": 2, "name": "img_size", "value": 640, "description": '训练图像大小', "default": 640, "type": "I", {"index": 2, "name": "img_size", "value": 640, "description": '训练图像大小', "default": 640, "type": "I",
'show': True}, 'show': True},
{"index": 3, "name": "device", "value": "0", "description": '训练核心', "default": "cuda", "type": "S", {"index": 3, "name": "device", "value": 'CUDA', "description": '训练核心', "default": 'CUDA', "type": "E",
"items": '', 'show': True}, # _kernel "items": _kernel, 'show': True}, # _kernel
{"index": 4, "name": "saveModDir", "value": "E:/alg_demo-master/alg_demo/app/yolov5/best.pt", {"index": 4, "name": "saveModDir", "value": "E:/alg_demo-master/alg_demo/app/yolov5/best.pt",
"description": '保存模型路径', "description": '保存模型路径',
"default": "./app/maskrcnn/saved_model/test.pt", "type": "S", 'show': False}, "default": "./app/maskrcnn/saved_model/test.pt", "type": "S", 'show': False},