Nets¶
simple_img_conv_pool¶
-
paddle.v2.fluid.nets.
simple_img_conv_pool
(input, num_filters, filter_size, pool_size, pool_stride, act, param_attr=None, pool_type='max')
img_conv_group¶
-
paddle.v2.fluid.nets.
img_conv_group
(input, conv_num_filter, pool_size, conv_padding=1, conv_filter_size=3, conv_act=None, param_attr=None, conv_with_batchnorm=False, conv_batchnorm_drop_rate=None, pool_stride=1, pool_type=None) Image Convolution Group, Used for vgg net.
sequence_conv_pool¶
-
paddle.v2.fluid.nets.
sequence_conv_pool
(input, num_filters, filter_size, param_attr=None, act='sigmoid', pool_type='max')
glu¶
-
paddle.v2.fluid.nets.
glu
(input, dim=-1) The gated linear unit composed by split, sigmoid activation and elementwise multiplication. Specifically, Split the input into two equal sized parts \(a\) and \(b\) along the given dimension and then compute as following:
\[{GLU}(a, b)= a \otimes \sigma(b)\]Refer to Language Modeling with Gated Convolutional Networks.
参数: - input (Variable) – The input variable which is a Tensor or LoDTensor.
- dim (int) – The dimension along which to split. If \(dim < 0\), the dimension to split along is \(rank(input) + dim\).
返回: The Tensor variable with half the size of input.
返回类型: Variable
Examples
# x is a Tensor variable with shape [3, 6, 9] fluid.nets.glu(input=x, dim=1) # shape of output: [3, 3, 9]