整理代码

This commit is contained in:
xinyang
2019-08-14 11:48:41 +08:00
parent 9d94de939b
commit 20d95b3f81
11 changed files with 124 additions and 91 deletions

View File

@@ -43,7 +43,7 @@ class DataSet:
if file[-3:] == "jpg":
sample = self.file2nparray("%s/%s" % (dir, file))
label = self.id2label(i)
if random.random() > 0.7:
if random.random() < 0.7:
self.train_samples.append(sample)
self.train_labels.append(label)
if i == 0: