ttslearn.wavenet.receptive_field_size

ttslearn.wavenet.receptive_field_size(total_layers, num_cycles, kernel_size, dilation=<function <lambda>>)[source]

Compute receptive field size of WaveNet

Parameters
  • total_layers (int) – total layers

  • num_cycles (int) – cycles

  • kernel_size (int) – kernel size

  • dilation (lambda) – lambda to compute dilation factor. lambda x : 1 to disable dilated convolution.

Returns

receptive field size in sample

Return type

int

Examples:

In [1]: from ttslearn.wavenet import receptive_field_size

In [2]: receptive_field_size(30, 3, 2)
Out[2]: 3070