mirror of
https://github.com/QData/TextAttack.git
synced 2021-10-13 00:05:06 +03:00
merge checkpoint changes in
This commit is contained in:
@@ -161,6 +161,10 @@ class Attack:
|
||||
|
||||
if shuffle:
|
||||
random.shuffle(dataset.examples)
|
||||
|
||||
if num_examples <= 0:
|
||||
return
|
||||
yield
|
||||
|
||||
for text, ground_truth_output in dataset:
|
||||
tokenized_text = TokenizedText(text, self.tokenizer)
|
||||
|
||||
Reference in New Issue
Block a user