File size: 1,351 Bytes
e86d760
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from toolbox.torchaudio.configuration_utils import PretrainedConfig


class DemucsConfig(PretrainedConfig):
    def __init__(self,
                 sample_rate: int = 8000,

                 in_channels: int = 1,
                 out_channels: int = 1,
                 hidden_channels: int = 48,

                 depth: int = 5,
                 kernel_size: int = 8,
                 stride: int = 4,

                 causal: bool = True,
                 resample: int = 4,
                 growth: int = 2,

                 max_hidden: int = 10_000,
                 do_normalize: bool = True,
                 rescale: float = 0.1,
                 floor: float = 1e-3,

                 **kwargs
                 ):
        super(DemucsConfig, self).__init__(**kwargs)
        self.sample_rate = sample_rate

        self.in_channels = in_channels
        self.out_channels = out_channels
        self.hidden_channels = hidden_channels

        self.depth = depth
        self.kernel_size = kernel_size
        self.stride = stride

        self.causal = causal
        self.resample = resample
        self.growth = growth

        self.max_hidden = max_hidden
        self.do_normalize = do_normalize
        self.rescale = rescale
        self.floor = floor


if __name__ == "__main__":
    pass