'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,
after dilating.
residual_channels: How many filters to learn for the residual.
dilation_channels: How many filters to learn for the dilated
convolution.
skip_channels: How many filters to learn that contribute to the
quantized softmax output.
quantization_channels: How many amplitude values to use for audio
quantization and the corresponding one-hot encoding.
Default: 256 (8-bit quantization).
use_biases: Whether to add a bias layer to each convolution.
Default: False.
scalar_input: Whether to use the quantized waveform directly as
input to the network instead of one-hot encoding it.
Default: False.
initial_filter_width: The width of the initial filter of the
convolution applied to the scalar input. This is only relevant
if scalar_input=True.
histograms: Whether to store histograms in the summary.
Default: False.
global_condition_channels: Number of channels in (embedding
size) of global conditioning vector. None indicates there is
no global conditioning.
global_condition_cardinality: Number of mutually exclusive
categories to be embedded in global condition embedding. If
not None, then this implies that global_condition tensor
specifies an integer selecting which of the N global condition
categories, where N = global_condition_cardinality. If None,
then the global_condition tensor is regarded as a vector which
must have dimension global_condition_channels.'

def __init__(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):

    self.batch_size = batch_size
    self.dilations = dilations
    self.filter_width = filter_width
    self.residual_channels = residual_channels
    self.dilation_channels = dilation_channels
    self.quantization_channels = quantization_channels
    self.use_biases = use_biases
    self.skip_channels = skip_channels
    self.scalar_input = scalar_input
    self.initial_filter_width = initial_filter_width
    self.histograms = histograms
    self.global_condition_channels = global_condition_channels
    self.global_condition_cardinality = global_condition_cardinality
    self.receptive_field = WaveNetModel.calculate_receptive_field(self.filter_width, self.dilations, self.scalar_input, self.initial_filter_width)
    self.variables = self._create_variables()
