diff --git a/models/nerulforcastmodels.py b/models/nerulforcastmodels.py index 48252d4..f91f215 100644 --- a/models/nerulforcastmodels.py +++ b/models/nerulforcastmodels.py @@ -274,8 +274,11 @@ def model_losss(sqlitedb,end_time): # 保存5个最佳模型的名称 if len(modelnames) > 5: modelnames = modelnames[0:5] - with open(os.path.join(dataset,"best_modelnames.txt"), 'w') as f: - f.write(','.join(modelnames) + '\n') + if is_fivemodels: + pass + else: + with open(os.path.join(dataset,"best_modelnames.txt"), 'w') as f: + f.write(','.join(modelnames) + '\n') # 预测值与真实值对比图 plt.rcParams['font.sans-serif'] = ['SimHei']