@@ -1183,14 +1183,17 @@ def conv2d(input,
1183
1183
act = None ,
1184
1184
name = None ):
1185
1185
"""
1186
- **Convlution2D Layer**
1187
-
1188
1186
The convolution2D layer calculates the output based on the input, filter
1189
- and strides, paddings, dilations, groups parameters. Input(Input) and
1190
- Output(Output) are in NCHW format. Where N is batch size, C is the number of
1187
+ and strides, paddings, dilations, groups parameters. Input and
1188
+ Output are in NCHW format, where N is batch size, C is the number of
1191
1189
channels, H is the height of the feature, and W is the width of the feature.
1192
- The details of convolution layer, please refer UFLDL's `convolution,
1193
- <http://ufldl.stanford.edu/tutorial/supervised/FeatureExtractionUsingConvolution/>`_ .
1190
+ Filter is in MCHW format, where M is the number of output image channels,
1191
+ C is the number of input image channels, H is the height of the filter,
1192
+ and W is the width of the filter. If the groups is greater than 1,
1193
+ C will equal the number of input image channels divided by the groups.
1194
+ Please refer to UFLDL's `convolution
1195
+ <http://ufldl.stanford.edu/tutorial/supervised/FeatureExtractionUsingConvolution/>`_
1196
+ for more detials.
1194
1197
If bias attribution and activation type are provided, bias is added to the
1195
1198
output of the convolution, and the corresponding activation function is
1196
1199
applied to the final result.
@@ -1201,15 +1204,14 @@ def conv2d(input,
1201
1204
1202
1205
Out = \sigma (W \\ ast X + b)
1203
1206
1204
- In the above equation :
1207
+ Where :
1205
1208
1206
1209
* :math:`X`: Input value, a tensor with NCHW format.
1207
1210
* :math:`W`: Filter value, a tensor with MCHW format.
1208
1211
* :math:`\\ ast`: Convolution operation.
1209
1212
* :math:`b`: Bias value, a 2-D tensor with shape [M, 1].
1210
1213
* :math:`\\ sigma`: Activation function.
1211
- * :math:`Out`: Output value, the shape of :math:`Out` and :math:`X` may be
1212
- different.
1214
+ * :math:`Out`: Output value, the shape of :math:`Out` and :math:`X` may be different.
1213
1215
1214
1216
Example:
1215
1217
@@ -1220,6 +1222,7 @@ def conv2d(input,
1220
1222
Filter shape: :math:`(C_{out}, C_{in}, H_f, W_f)`
1221
1223
1222
1224
- Output:
1225
+
1223
1226
Output shape: :math:`(N, C_{out}, H_{out}, W_{out})`
1224
1227
1225
1228
Where
@@ -1231,7 +1234,7 @@ def conv2d(input,
1231
1234
1232
1235
Args:
1233
1236
input (Variable): The input image with [N, C, H, W] format.
1234
- num_filters(int): The number of filter. It is as same as the output
1237
+ num_filters(int): The number of filter. It is as same as the output
1235
1238
image channel.
1236
1239
filter_size (int|tuple|None): The filter size. If filter_size is a tuple,
1237
1240
it must contain two integers, (filter_size_H, filter_size_W).
@@ -1254,7 +1257,8 @@ def conv2d(input,
1254
1257
bias_attr (ParamAttr): Bias parameter for the Conv2d layer. Default: None
1255
1258
use_cudnn (bool): Use cudnn kernel or not, it is valid only when the cudnn
1256
1259
library is installed. Default: True
1257
- use_mkldnn (bool): Use mkldnn kernels or not.
1260
+ use_mkldnn (bool): Use mkldnn kernels or not, it is valid only when compiled
1261
+ with mkldnn library. Default: False
1258
1262
act (str): Activation type. Default: None
1259
1263
name (str|None): A name for this layer(optional). If set None, the layer
1260
1264
will be named automatically.
0 commit comments