generated from LufsX/Experiment-kNN
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ def load_dataset(directory):
|
||||
data = []
|
||||
labels = []
|
||||
|
||||
for filename in os.listdir(directory):
|
||||
for filename in os.listdir("D:\\two"):
|
||||
if filename.endswith(".txt"):
|
||||
label = int(filename.split('_')[0]) # 假设文件名格式为 "label_xxx.txt"
|
||||
with open(os.path.join(directory, filename), 'r') as f:
|
||||
|
||||
Reference in New Issue
Block a user