ReadMe.md 9.8 KB
Newer Older
J
Jason 已提交
1 2 3
# Caffe-Fluid常用层对应表

本文档梳理了Caffe常用Layer与PaddlePaddle API对应关系和差异分析。根据文档对应关系,有Caffe使用经验的用户,可根据对应关系,快速熟悉PaddlePaddle的接口使用 。  
S
sunyanfang01 已提交
4 5 6 7


| 序号 | Caffe层                                                      | PaddlePaddle接口                                             | 备注                                                         |
| ---- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
S
SunAhong1993 已提交
8 9 10 11 12 13 14 15 16 17
| 1    | [AbsVal](http://caffe.berkeleyvision.org/tutorial/layers/absval.html) | [fluid.layers.abs](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-189-abs) | 功能一致                                                     |
| 2    | [Accuracy](http://caffe.berkeleyvision.org/tutorial/layers/accuracy.html) | [fluid.layers.accuracy](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-269-accuracy) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Accuracy.md) |
| 3    | [ArgMax](http://caffe.berkeleyvision.org/tutorial/layers/argmax.html) | [fluid.layers.argmax](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-214-argmax) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/ArgMax.md) |
| 4    | [BatchNorm](http://caffe.berkeleyvision.org/tutorial/layers/batchnorm.html) | [fluid.layers.batch_norm](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-36-batch_norm) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/BatchNorm.md) |
| 5    | [BNLL](http://caffe.berkeleyvision.org/tutorial/layers/bnll.html) | [fluid.layers.softplus](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-204-softplus) | 功能一致                                                     |
| 6    | [Concat](http://caffe.berkeleyvision.org/tutorial/layers/concat.html) | [fluid.layers.concat](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-219-concat) | 功能一致                                                     |
| 7    | [Convolution](http://caffe.berkeleyvision.org/tutorial/layers/convolution.html) | [fluid.layers.conv2d](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-45-conv2d) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Convolution.md) |
| 8    | [Crop](http://caffe.berkeleyvision.org/tutorial/layers/crop.html) | [fluid.layers.crop](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-51-crop) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Crop.md) |
| 9    | [Deconvolution](http://caffe.berkeleyvision.org/tutorial/layers/deconvolution.html) | [fluid.layers.conv2d_transpose](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-46-conv2d_transpose) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Deconvolution.md) |
| 10   | [Dropout](http://caffe.berkeleyvision.org/tutorial/layers/dropout.html) | [fluid.layers.dropout](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-56-dropout) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Dropout.md) |
S
SunAhong1993 已提交
18
| 11   | [Eltwise](http://caffe.berkeleyvision.org/tutorial/layers/eltwise.html) | 无相应接口                                                   | [Paddle实现方法](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Eltwise.md) |
S
SunAhong1993 已提交
19 20 21 22 23 24 25
| 12   | [ELU](http://caffe.berkeleyvision.org/tutorial/layers/elu.html) | [fluid.layers.elu](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-68-elu) | 功能一致                                                     |
| 13   | [EuclideanLoss](http://caffe.berkeleyvision.org/tutorial/layers/euclideanloss.html) | [fluid.layers.square_error_cost](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-173-square_error_cost) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/EuclideanLoss.md) |
| 14   | [Exp](http://caffe.berkeleyvision.org/tutorial/layers/exp.html) | [fluid.layers.exp](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-196-exp) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Exp.md) |
| 15   | [Flatten](http://caffe.berkeleyvision.org/tutorial/layers/flatten.html) | [fluid.layers.reshape](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-134-reshape) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Flatten.md) |
| 16   | [InnerProduct](http://caffe.berkeleyvision.org/tutorial/layers/innerproduct.html) | [fluid.layers.fc](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-71-fc) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/InnerProduct.md) |
| 17   | [Input](http://caffe.berkeleyvision.org/tutorial/layers/input.html) | [fluid.layers.data](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-20-data) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Input.md) |
| 18   | [Log](http://caffe.berkeleyvision.org/tutorial/layers/log.html) | [fluid.layers.log](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-95-log) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Log.md) |
S
SunAhong1993 已提交
26
| 19   | [LRN](http://caffe.berkeleyvision.org/tutorial/layers/lrn.html) | [fluid.layers.lrn](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-101-lrn) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/LRN.md) |
S
SunAhong1993 已提交
27 28 29
| 20   | [Pooling](http://caffe.berkeleyvision.org/tutorial/layers/pooling.html) | [fluid.layers.pool2d](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-119-pool2d) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Pooling.md) |
| 21   | [Power](http://caffe.berkeleyvision.org/tutorial/layers/power.html) | [fluid.layers.pow](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-121-pow) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Power.md) |
| 22   | [PReLU](http://caffe.berkeleyvision.org/tutorial/layers/prelu.html) | [fluid.layers.prelu](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-122-prelu) | 功能一致                                                     |
S
SunAhong1993 已提交
30 31 32 33 34 35
| 23   | [Reduction](http://caffe.berkeleyvision.org/tutorial/layers/reduction.html) | 无相应接口                                                   | [Paddle实现方法](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Reduction.md) |
| 24   | [ReLU](http://caffe.berkeleyvision.org/tutorial/layers/relu.html) | [fluid.layers.leaky_relu](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-132-relu) | 功能一致                                                     |
| 25   | [Reshape](http://caffe.berkeleyvision.org/tutorial/layers/reshape.html) | [fluid.layers.reshape](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-134-reshape) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Reshape.md) |
| 26   | [SigmoidCrossEntropyLoss](http://caffe.berkeleyvision.org/tutorial/layers/sigmoidcrossentropyloss.html) | [fluid.layers.sigmoid_cross_entropy_with_logits](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-163-sigmoid_cross_entropy_with_logits) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/SigmoidCrossEntropyLoss.md) |
| 27   | [Sigmoid](http://caffe.berkeleyvision.org/tutorial/layers/sigmoid.html) | [fluid.layers.sigmoid](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-202-sigmoid) | 功能一致                                                     |
| 28   | [Slice](http://caffe.berkeleyvision.org/tutorial/layers/slice.html) | [fluid.layers.slice](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-165-slice) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Slice.md) |
J
Jason 已提交
36
| 29   | [SoftmaxWithLoss](http://caffe.berkeleyvision.org/tutorial/layers/softmaxwithloss.html) | [fluid.layers.softmax_with_cross_entropy](http://paddlepaddle.org/documentation/docs/zh/1.3/api_cn/layers_cn.html#permalink-164-softmax_with_cross_entropy) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/SofmaxWithLoss.md) |
S
SunAhong1993 已提交
37 38 39
| 30   | [Softmax](http://caffe.berkeleyvision.org/tutorial/layers/softmax.html) | [fluid.layers.softmax](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-169-softmax_with_cross_entropy) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Sofmax.md) |
| 31   | [TanH](http://caffe.berkeleyvision.org/tutorial/layers/tanh.html) | [fluid.layers.tanh](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-209-tanh) | 功能一致                                                     |
| 32   | [Tile](http://caffe.berkeleyvision.org/tutorial/layers/tile.html) | [fluid.layers.expand](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#permalink-70-expand) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/blob/master/caffe2fluid/doc/Tile.md) |