Skip to content

Commit

Permalink
【Cleanup random_seed No.3、12-13】clean some random_seed (#61074)
Browse files Browse the repository at this point in the history
  • Loading branch information
gouzil authored Jan 25, 2024
1 parent c62cb27 commit 89d19f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions test/ipu/test_weight_decay_ipu.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ def exclude_fn(param):
scope = paddle.static.Scope()
main_prog = paddle.static.Program()
startup_prog = paddle.static.Program()
main_prog.random_seed = self.SEED
startup_prog.random_seed = self.SEED
paddle.seed(self.SEED)
np.random.seed(self.SEED)

with paddle.static.scope_guard(scope):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
paddle.dataset.mnist.fetch()

# Fix seed for test
base.default_startup_program().random_seed = 1
base.default_main_program().random_seed = 1
paddle.seed(1)


def cnn_model(data):
Expand Down

0 comments on commit 89d19f5

Please sign in to comment.