Seed function for random, torch, torch.cuda
Project description
Seed function (random, torch, torch.cuda)
- seed_everything
- get_seed_state
- set_seed_state
seed_everything
from py_seeds import seed_everything
seed_everything(0)
get_seed_state
import torch
from py_seeds import get_seed_state
state = get_seed_state()
torch.save(state, 'seeds.pth')
set_seed_state
import torch
from py_seeds import set_seed_state
state = torch.load('seeds.pth')
set_seed_state(state)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-seeds-0.0.2.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py-seeds-0.0.2.tar.gz.
File metadata
- Download URL: py-seeds-0.0.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44d5a74d25d17b163dad21a38acb2a97215da299e55dabba19538282c7f0b50d
|
|
| MD5 |
2daa79e75ddcc1f6feaf460f436d7791
|
|
| BLAKE2b-256 |
ab02d6e773fb94b9d23b27c2b40b65fafdc8124a8510ec24faabb079ac76d1a4
|
File details
Details for the file py_seeds-0.0.2-py3-none-any.whl.
File metadata
- Download URL: py_seeds-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8679b50727fbf210bf0bad606998a99f4c3d207ea799306c5434daf421c5fee
|
|
| MD5 |
91a91bdd94eef400c73e7c86c0504e37
|
|
| BLAKE2b-256 |
b57ca849085313f42adf085c736dfcab0229af2a688cd07f8fe5eb595ff9a024
|