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

add gradient-based white-box search

This commit is contained in:
Jin Yong Yoo
2020-10-05 18:46:47 -04:00
parent 6273b19c19
commit bdbeae80d2
7 changed files with 71 additions and 8 deletions

View File

@@ -114,6 +114,8 @@ class Attack:
)
)
self.search_method.filter_transformations = self.filter_transformations
if not search_method.is_blackbox:
self.search_method.get_model = lambda: self.goal_function.model
def clear_cache(self, recursive=True):
self.constraints_cache.clear()