Skip to content

Commit

Permalink
Update syntheticdataset.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yinxiangshi authored Apr 22, 2022
1 parent 19f9a62 commit 26d45f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wrench/synthetic/syntheticdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def generate_split(self, split: str = 'train', n_data: int = 1000):
dataset = SyntheticDataset(split=split, id2label=self.id2labels.copy(), **generated)
return dataset

def sampel_other_label(self, label):
def sample_other_label(self, label):
other_labels = [i for i in range(self.n_class) if i != label]
p = np.array([self.class_prior[i] for i in other_labels])
p = p / np.sum(p)
Expand Down

0 comments on commit 26d45f8

Please sign in to comment.