mirror of
https://github.com/QData/TextAttack.git
synced 2021-10-13 00:05:06 +03:00
update attackedtext references, need to update tokenization
This commit is contained in:
@@ -217,10 +217,10 @@ class Attack:
|
||||
yield
|
||||
|
||||
for text, ground_truth_output in dataset:
|
||||
tokenized_text = AttackedText(text, self.goal_function.tokenizer)
|
||||
attacked_text = AttackedText(text)
|
||||
self.goal_function.num_queries = 0
|
||||
goal_function_result, _ = self.goal_function.get_result(
|
||||
tokenized_text, ground_truth_output
|
||||
attacked_text, ground_truth_output
|
||||
)
|
||||
# We can skip examples for which the goal is already succeeded,
|
||||
# unless `attack_skippable_examples` is True.
|
||||
|
||||
Reference in New Issue
Block a user