AIvry commited on
Commit
ca1dceb
·
verified ·
1 Parent(s): 437e805

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +32 -35
config.py CHANGED
@@ -1,35 +1,32 @@
1
- """
2
- Basic configuration and default values used in the MAPSS computations.
3
- """
4
- import os
5
- import torch
6
- import warnings
7
- warnings.filterwarnings(
8
- "ignore",
9
- category=UserWarning,
10
- message=r"^expandable_segments not supported on this platform"
11
- )
12
-
13
- SR = 16_000
14
- RESULTS_ROOT = "results"
15
- BATCH_SIZE = 2
16
- ENERGY_WIN_MS = 20
17
- ENERGY_HOP_MS = 20
18
- SILENCE_RATIO = 0.1
19
- EPS = 1e-4
20
- COV_TOL = 1e-6
21
-
22
- DEFAULT_LAYER = 2
23
- DEFAULT_ADD_CI = True
24
- DEFAULT_DELTA_CI = 0.05
25
- DEFAULT_ALPHA = 1.0
26
-
27
- os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "max_split_size_mb:128,expandable_segments:True,garbage_collection_threshold:0.6"
28
- os.environ["CUDA_LAUNCH_BLOCKING"] = "0"
29
-
30
- torch.backends.cudnn.benchmark = True
31
- torch.backends.cudnn.deterministic = False
32
- torch.backends.cudnn.enabled = True
33
-
34
- if torch.cuda.is_available():
35
- torch.cuda.set_per_process_memory_fraction(0.8)
 
1
+ """
2
+ Basic configuration and default values used in the MAPSS computations.
3
+ """
4
+ import os
5
+ import torch
6
+ import warnings
7
+ warnings.filterwarnings(
8
+ "ignore",
9
+ category=UserWarning,
10
+ message=r"^expandable_segments not supported on this platform"
11
+ )
12
+
13
+ SR = 16_000
14
+ RESULTS_ROOT = "results"
15
+ BATCH_SIZE = 2
16
+ ENERGY_WIN_MS = 20
17
+ ENERGY_HOP_MS = 20
18
+ SILENCE_RATIO = 0.1
19
+ EPS = 1e-4
20
+ COV_TOL = 1e-6
21
+
22
+ DEFAULT_LAYER = 2
23
+ DEFAULT_ADD_CI = True
24
+ DEFAULT_DELTA_CI = 0.05
25
+ DEFAULT_ALPHA = 1.0
26
+
27
+ os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "max_split_size_mb:128,expandable_segments:True,garbage_collection_threshold:0.6"
28
+ os.environ["CUDA_LAUNCH_BLOCKING"] = "0"
29
+
30
+ torch.backends.cudnn.benchmark = True
31
+ torch.backends.cudnn.deterministic = False
32
+ torch.backends.cudnn.enabled = True