MCPcopy
hub / github.com/ibab/tensorflow-wavenet / __init__

Method __init__

wavenet/model.py:46–115  ·  view source on GitHub ↗

Initializes the WaveNet model. Args: batch_size: How many audio files are supplied per batch (recommended: 1). dilations: A list with the dilation factor for each layer. filter_width: The samples that are included in each convolution,

(self,
                 batch_size,
                 dilations,
                 filter_width,
                 residual_channels,
                 dilation_channels,
                 skip_channels,
                 quantization_channels=2**8,
                 use_biases=False,
                 scalar_input=False,
                 initial_filter_width=32,
                 histograms=False,
                 global_condition_channels=None,
                 global_condition_cardinality=None)

Source from the content-addressed store, hash-verified

44 '''
45
46 def __init__(self,
47 batch_size,
48 dilations,
49 filter_width,
50 residual_channels,
51 dilation_channels,
52 skip_channels,
53 quantization_channels=2**8,
54 use_biases=False,
55 scalar_input=False,
56 initial_filter_width=32,
57 histograms=False,
58 global_condition_channels=None,
59 global_condition_cardinality=None):
60 '''Initializes the WaveNet model.
61
62 Args:
63 batch_size: How many audio files are supplied per batch
64 (recommended: 1).
65 dilations: A list with the dilation factor for each layer.
66 filter_width: The samples that are included in each convolution,
67 after dilating.
68 residual_channels: How many filters to learn for the residual.
69 dilation_channels: How many filters to learn for the dilated
70 convolution.
71 skip_channels: How many filters to learn that contribute to the
72 quantized softmax output.
73 quantization_channels: How many amplitude values to use for audio
74 quantization and the corresponding one-hot encoding.
75 Default: 256 (8-bit quantization).
76 use_biases: Whether to add a bias layer to each convolution.
77 Default: False.
78 scalar_input: Whether to use the quantized waveform directly as
79 input to the network instead of one-hot encoding it.
80 Default: False.
81 initial_filter_width: The width of the initial filter of the
82 convolution applied to the scalar input. This is only relevant
83 if scalar_input=True.
84 histograms: Whether to store histograms in the summary.
85 Default: False.
86 global_condition_channels: Number of channels in (embedding
87 size) of global conditioning vector. None indicates there is
88 no global conditioning.
89 global_condition_cardinality: Number of mutually exclusive
90 categories to be embedded in global condition embedding. If
91 not None, then this implies that global_condition tensor
92 specifies an integer selecting which of the N global condition
93 categories, where N = global_condition_cardinality. If None,
94 then the global_condition tensor is regarded as a vector which
95 must have dimension global_condition_channels.
96
97 '''
98 self.batch_size = batch_size
99 self.dilations = dilations
100 self.filter_width = filter_width
101 self.residual_channels = residual_channels
102 self.dilation_channels = dilation_channels
103 self.quantization_channels = quantization_channels

Callers

nothing calls this directly

Calls 2

_create_variablesMethod · 0.95

Tested by

no test coverage detected