Add a comment before layer pad2d

This commit is contained in:
liuyibing01 2020-03-13 06:05:57 +00:00
parent bfbc5e2046
commit f618b21765
1 changed files with 1 additions and 0 deletions

View File

@ -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)