修复预测脚本和训练脚本的执行bug

This commit is contained in:
2025-10-21 19:49:21 +08:00
parent b9cce1d733
commit 4fb2da1366
10 changed files with 87 additions and 45 deletions

View File

@@ -182,7 +182,7 @@ def get_data_from_csv_feature(data_path,skip_rows = 100,sample_rows = 100,normal
sampled_indices = torch.arange(0, len(data_ori), skip_rows) # 记录行号
return label_name,source_data,normalizer.params["min"],normalizer.params["max"],normalizer.params["mean"],sampled_indices,data_sample
def get_train_data_from_csv(data_path,normalization = false,normalization_type = 'minmax'):
def get_train_data_from_csv(data_path,normalization = True,normalization_type = 'minmax'):
"""读取csv数据文件并生成标准化训练数据
Args:
data_path (str): 文件绝对路径
@@ -196,6 +196,8 @@ def get_train_data_from_csv(data_path,normalization = false,normalization_type =
Examples:
get_data_from_csv_feature("D://test.excel")
:param normalization_type:
:param normalization:
"""
# 读取前xx行数据
df = pd.read_csv(data_path,encoding='gbk')