Parcourir la source

Add seeding for numpy functions

dustin.born il y a 6 ans
Parent
commit
25bc234c5c
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      code/Attack/BaseAttack.py

+ 1 - 0
code/Attack/BaseAttack.py

@@ -292,6 +292,7 @@ class BaseAttack(metaclass=abc.ABCMeta):
         """
         if isinstance(seed, int):
             random.seed(seed)
+            np.random.seed(seed)
 
     def set_start_time(self):
         """