mirror of
https://github.com/QData/TextAttack.git
synced 2021-10-13 00:05:06 +03:00
free unncessary memory in TokenizedText
This commit is contained in:
@@ -141,7 +141,6 @@ class GeneticAlgorithm(SearchMethod):
|
||||
for idx, result in enumerate(pop_results):
|
||||
pop[idx].result = pop_results[idx]
|
||||
pop = sorted(pop, key=lambda x: -x.result.score)
|
||||
#print('\t\t', i, ' -- ', float(pop[0].result.score))
|
||||
|
||||
pop_scores = torch.Tensor([r.score for r in pop_results])
|
||||
logits = ((-pop_scores) / self.temp).exp()
|
||||
|
||||
Reference in New Issue
Block a user