Files
FunASR/funasr/train_utils/set_all_random_seed.py
freedakgmail 6116b1f3c6
Update API Documentation / build-api-docs (push) Has been cancelled
Initial commit: FunASR Speech Recognition Toolkit
Add complete FunASR codebase including models, runtime, and documentation.
2026-07-09 22:38:58 +08:00

16 lines
250 B
Python

import random
import numpy as np
import torch
def set_all_random_seed(seed: int):
"""Set all random seed.
Args:
seed: TODO.
"""
random.seed(seed)
np.random.seed(seed)
torch.random.manual_seed(seed)