文件结构调整

This commit is contained in:
Yunhao Meng 2025-05-05 17:03:41 +08:00
parent ba4508507b
commit 310131d876
3 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ def federated_avg(global_model, client_weights):
def federated_train(num_rounds, clients_data):
# 初始化全局模型
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
global_model = YOLO("yolov8n.pt").to(device)
global_model = YOLO("../yolov8n.pt").to(device)
# 设置类别数
global_model.model.nc = 1

Binary file not shown.