From f618b21765bcc33eff8bb87be333aabe5fc8e662 Mon Sep 17 00:00:00 2001 From: liuyibing01 Date: Fri, 13 Mar 2020 06:05:57 +0000 Subject: [PATCH] Add a comment before layer pad2d --- parakeet/models/waveflow/waveflow_modules.py | 1 + 1 file changed, 1 insertion(+) diff --git a/parakeet/models/waveflow/waveflow_modules.py b/parakeet/models/waveflow/waveflow_modules.py index 15a7fd2..51f9108 100644 --- a/parakeet/models/waveflow/waveflow_modules.py +++ b/parakeet/models/waveflow/waveflow_modules.py @@ -220,6 +220,7 @@ class Flow(dg.Layer): # Pad width dim (time): dialated non-causal convolution pad_top, pad_bottom = (self.kernel_h - 1) * dilation_h, 0 pad_left = pad_right = int((self.kernel_w - 1) * dilation_w / 2) + # Using pad2d is a bit faster than using padding in Conv2D directly audio_pad = fluid.layers.pad2d( audio, paddings=[pad_top, pad_bottom, pad_left, pad_right]) hidden = self.in_layers[i](audio_pad)