1
0
mirror of https://github.com/QData/TextAttack.git synced 2021-10-13 00:05:06 +03:00

allow maximization goal functions

This commit is contained in:
uvafan
2020-06-23 23:33:48 -04:00
parent fe109267a1
commit 0fcfb51b7f
19 changed files with 115 additions and 78 deletions

View File

@@ -114,7 +114,7 @@ def run(args):
num_results += 1
if type(result) == textattack.attack_results.SuccessfulAttackResult:
if type(result) == textattack.attack_results.SuccessfulAttackResult or type(result) == textattack.attack_results.MaximizedAttackResult:
num_successes += 1
if type(result) == textattack.attack_results.FailedAttackResult:
num_failures += 1