未验证 提交 18d2c912 编写于 作者: J Jason 提交者: GitHub

Update tf.layers.conv2d.md

上级 4ec4f34b
......@@ -51,7 +51,7 @@ TensorFlow: 默认输入数据格式为`NHWC`,表示`(batch,height, width, i
| 输入 | 卷积核 | 输出 |
|--------------------|-------------------|------------------|
|NHWC | (kernel_h, kernel_w, filters_num, in_channels)| (batch, out_h, out_w, filters_num)|
|NDHW | (kernel_h, kernel_w, filters_num, in_channels) | (batch, filters_num, out_h, out_w)|
|NCHW | (kernel_h, kernel_w, filters_num, in_channels) | (batch, filters_num, out_h, out_w)|
PaddlePaddle:只支持输入数据格式为`NCHW`,且**卷积核格式**与TensorFlow不同,其中输入、输出、卷积核对应关系如下表所示,
......@@ -84,4 +84,4 @@ PaddlePaddle: 使用`paddle.fluid.layers.conv2d`,可参考
# 卷积核Shape: (5, 3, 4, 4)
inputs = paddle.fluid.layers.data(dtype='float32', shape=[3, 200, 200], name='inputs)
pad_inputs = paddle.fluid.layers.pad2d(inputs, paddings=[1, 2, 1, 2])
outputs = paddle.fluid.layers.conv2d(pad_inputs, 5, [4, 4], (1, 1))
\ No newline at end of file
outputs = paddle.fluid.layers.conv2d(pad_inputs, 5, [4, 4], (1, 1))
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册