fix range

This commit is contained in:
jh 2021-03-16 19:18:22 -07:00
commit 4223ec7986

View file

@ -506,7 +506,7 @@ Examples: df, liae, df-d, df-ud, liae-ud, ...
num_labels = self.batch_size num_labels = self.batch_size
for d in tensor.shape[1:]: for d in tensor.shape[1:]:
num_labels *= d num_labels *= d
for _ in num_labels: for _ in range(num_labels):
if np.random.random() < noise: if np.random.random() < noise:
label = 0 if label == 1 else 1 label = 0 if label == 1 else 1
if label == 0: if label == 0: