Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

seed.py 316 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  1. """
  2. This file is copied/apdated from https://github.com/berkeleydeeprlcourse/homework/tree/master/hw3
  3. """
  4. import numpy as np
  5. import random
  6. def set_global_seeds(i):
  7. try:
  8. import torch
  9. except ImportError:
  10. pass
  11. else:
  12. torch.manual_seed(i)
  13. np.random.seed(i)
  14. random.seed(i)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...