mirror of
https://github.com/HumanAIGC/lite-avatar.git
synced 2026-02-05 18:09:20 +08:00
add files
This commit is contained in:
10
funasr_local/torch_utils/set_all_random_seed.py
Normal file
10
funasr_local/torch_utils/set_all_random_seed.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import random
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
|
||||
|
||||
def set_all_random_seed(seed: int):
|
||||
random.seed(seed)
|
||||
np.random.seed(seed)
|
||||
torch.random.manual_seed(seed)
|
||||
Reference in New Issue
Block a user