mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
Fix/patch how fix_random_seed() is imported.
This commit is contained in:
parent
26a1730392
commit
8a38d9a855
@ -23,7 +23,7 @@ from functools import lru_cache
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
import torch
|
import torch
|
||||||
import lhotse
|
from lhotse.utils import fix_random_seed
|
||||||
|
|
||||||
from lhotse import CutSet, Fbank, FbankConfig, load_manifest
|
from lhotse import CutSet, Fbank, FbankConfig, load_manifest
|
||||||
from lhotse.dataset import (
|
from lhotse.dataset import (
|
||||||
@ -307,7 +307,7 @@ class LibriSpeechAsrDataModule:
|
|||||||
# set in the main process.
|
# set in the main process.
|
||||||
seed = torch.randint(0, 100000, ()).item()
|
seed = torch.randint(0, 100000, ()).item()
|
||||||
def worker_init_fn(worker_id: int):
|
def worker_init_fn(worker_id: int):
|
||||||
lhotse.utils.fix_random_seed(seed + worker_id)
|
fix_random_seed(seed + worker_id)
|
||||||
|
|
||||||
train_dl = DataLoader(
|
train_dl = DataLoader(
|
||||||
train,
|
train,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user