Avoid failing if cupy random can'tbe set

This commit is contained in:
Matthw Honnibal 2019-10-23 05:13:28 +02:00
parent f8bf5b7fe5
commit 9e32d8271c

View File

@ -719,7 +719,10 @@ def fix_random_seed(seed=0):
random.seed(seed) random.seed(seed)
numpy.random.seed(seed) numpy.random.seed(seed)
if cupy is not None: if cupy is not None:
cupy.random.seed(seed) try:
cupy.random.seed(seed)
except:
pass
def get_json_validator(schema): def get_json_validator(schema):