@@ -225,11 +225,11 @@ def embedding(input,
225
225
have two elements which indicate the size of the dictionary of
226
226
embeddings and the size of each embedding vector respectively.
227
227
is_sparse(bool): The flag indicating whether to use sparse update.
228
- is_distributed (bool): Whether to run lookup table from remote parameter server.
228
+ is_distributed(bool): Whether to run lookup table from remote parameter server.
229
229
padding_idx(int|long|None): If :attr:`None`, it makes no effect to lookup.
230
230
Otherwise the given :attr:`padding_idx` indicates padding the output
231
231
with zeros whenever lookup encounters it in :attr:`input`. If
232
- :math:`padding_idx < 0`, the padding_idx to use in lookup is
232
+ :math:`padding_idx < 0`, the :attr:` padding_idx` to use in lookup is
233
233
:math:`size[0] + dim`.
234
234
param_attr(ParamAttr): Parameters for this layer
235
235
dtype(np.dtype|core.VarDesc.VarType|str): The type of data : float32, float_16, int etc
@@ -1235,14 +1235,17 @@ def conv2d(input,
1235
1235
act = None ,
1236
1236
name = None ):
1237
1237
"""
1238
- **Convlution2D Layer**
1239
-
1240
1238
The convolution2D layer calculates the output based on the input, filter
1241
- and strides, paddings, dilations, groups parameters. Input(Input) and
1242
- Output(Output) are in NCHW format. Where N is batch size, C is the number of
1239
+ and strides, paddings, dilations, groups parameters. Input and
1240
+ Output are in NCHW format, where N is batch size, C is the number of
1243
1241
channels, H is the height of the feature, and W is the width of the feature.
1244
- The details of convolution layer, please refer UFLDL's `convolution,
1245
- <http://ufldl.stanford.edu/tutorial/supervised/FeatureExtractionUsingConvolution/>`_ .
1242
+ Filter is in MCHW format, where M is the number of output image channels,
1243
+ C is the number of input image channels, H is the height of the filter,
1244
+ and W is the width of the filter. If the groups is greater than 1,
1245
+ C will equal the number of input image channels divided by the groups.
1246
+ Please refer to UFLDL's `convolution
1247
+ <http://ufldl.stanford.edu/tutorial/supervised/FeatureExtractionUsingConvolution/>`_
1248
+ for more detials.
1246
1249
If bias attribution and activation type are provided, bias is added to the
1247
1250
output of the convolution, and the corresponding activation function is
1248
1251
applied to the final result.
@@ -1253,15 +1256,14 @@ def conv2d(input,
1253
1256
1254
1257
Out = \sigma (W \\ ast X + b)
1255
1258
1256
- In the above equation :
1259
+ Where :
1257
1260
1258
1261
* :math:`X`: Input value, a tensor with NCHW format.
1259
1262
* :math:`W`: Filter value, a tensor with MCHW format.
1260
1263
* :math:`\\ ast`: Convolution operation.
1261
1264
* :math:`b`: Bias value, a 2-D tensor with shape [M, 1].
1262
1265
* :math:`\\ sigma`: Activation function.
1263
- * :math:`Out`: Output value, the shape of :math:`Out` and :math:`X` may be
1264
- different.
1266
+ * :math:`Out`: Output value, the shape of :math:`Out` and :math:`X` may be different.
1265
1267
1266
1268
Example:
1267
1269
@@ -1272,6 +1274,7 @@ def conv2d(input,
1272
1274
Filter shape: :math:`(C_{out}, C_{in}, H_f, W_f)`
1273
1275
1274
1276
- Output:
1277
+
1275
1278
Output shape: :math:`(N, C_{out}, H_{out}, W_{out})`
1276
1279
1277
1280
Where
@@ -1283,7 +1286,7 @@ def conv2d(input,
1283
1286
1284
1287
Args:
1285
1288
input (Variable): The input image with [N, C, H, W] format.
1286
- num_filters(int): The number of filter. It is as same as the output
1289
+ num_filters(int): The number of filter. It is as same as the output
1287
1290
image channel.
1288
1291
filter_size (int|tuple|None): The filter size. If filter_size is a tuple,
1289
1292
it must contain two integers, (filter_size_H, filter_size_W).
@@ -1306,7 +1309,8 @@ def conv2d(input,
1306
1309
bias_attr (ParamAttr): Bias parameter for the Conv2d layer. Default: None
1307
1310
use_cudnn (bool): Use cudnn kernel or not, it is valid only when the cudnn
1308
1311
library is installed. Default: True
1309
- use_mkldnn (bool): Use mkldnn kernels or not.
1312
+ use_mkldnn (bool): Use mkldnn kernels or not, it is valid only when compiled
1313
+ with mkldnn library. Default: False
1310
1314
act (str): Activation type. Default: None
1311
1315
name (str|None): A name for this layer(optional). If set None, the layer
1312
1316
will be named automatically.
0 commit comments