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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user