fix seed=0 bug

pull/1372/head
stephon 2021-11-01 06:16:24 +00:00
parent cb96c82b7c
commit 7a17f72fc2
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class Engine(object):
# set seed
seed = self.config["Global"].get("seed", False)
if seed:
if seed or seed == 0:
assert isinstance(seed, int), "The 'seed' must be a integer!"
paddle.seed(seed)
np.random.seed(seed)