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

remove print and add missing import

This commit is contained in:
Jin Yong Yoo
2020-05-23 10:53:27 -04:00
parent 0191c4ac5c
commit 9152ba8d82
2 changed files with 3 additions and 1 deletions

View File

@@ -141,7 +141,7 @@ 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))
#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()