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

add list and augment functionality + tests

This commit is contained in:
Jack Morris
2020-06-20 15:04:45 -04:00
parent 8dcc0805b3
commit 7bdc6e457b
21 changed files with 593 additions and 277 deletions

View File

@@ -1,4 +1,5 @@
import random
import numpy as np
import torch
@@ -80,6 +81,7 @@ def load_textattack_model_from_path(model_name, model_path):
raise ValueError(f"Unknown textattack model {model_path}")
return model
def set_seed(random_seed):
random.seed(random_seed)
np.random.seed(random_seed)