File size: 756 Bytes
ca1dceb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""
Basic configuration and default values used in the MAPSS computations.
"""
import os
import torch
import warnings
warnings.filterwarnings(
    "ignore",
    category=UserWarning,
    message=r"^expandable_segments not supported on this platform"
)

SR = 16_000
RESULTS_ROOT = "results"
BATCH_SIZE = 2
ENERGY_WIN_MS = 20
ENERGY_HOP_MS = 20
SILENCE_RATIO = 0.1
EPS = 1e-4
COV_TOL = 1e-6

DEFAULT_LAYER = 2
DEFAULT_ADD_CI = True
DEFAULT_DELTA_CI = 0.05
DEFAULT_ALPHA = 1.0

os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "max_split_size_mb:128,expandable_segments:True,garbage_collection_threshold:0.6"
os.environ["CUDA_LAUNCH_BLOCKING"] = "0"

torch.backends.cudnn.benchmark = True
torch.backends.cudnn.deterministic = False
torch.backends.cudnn.enabled = True