## 基础操作类API映射列表
该文档梳理了基础操作的PyTorch-PaddlePaddle API映射列表,主要包括了构造Tensor、数学计算、逻辑计算相关的API。
| 序号 | PyTorch API | PaddlePaddle API | 备注 |
| ---- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| 1 | [torch.set\_default\_dtype](https://pytorch.org/docs/stable/generated/torch.set_default_dtype.html) | [paddle.set\_default\_dtype](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/set_default_dtype_cn.html#set-default-dtype) | 功能一致 |
| 2 | [torch.get\_default\_dtype](https://pytorch.org/docs/stable/generated/torch.get_default_dtype.html) | [paddle.get\_default\_dtype](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/get_default_dtype_cn.html#get-default-dtype) | 功能一致 |
| 3 | [torch.numel](https://pytorch.org/docs/stable/generated/torch.numel.html) | [paddle.numel](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/numel_cn.html#numel) | 功能一致,参数名不一致 |
| 4 | [torch.tensor](https://pytorch.org/docs/stable/generated/torch.tensor.html?highlight=tensor#torch.tensor) | [paddle.to\_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/to_tensor_cn.html#to-tensor) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.tensor.md) |
| 5 | [torch.from\_numpy](https://pytorch.org/docs/stable/generated/torch.from_numpy.html?highlight=from_numpy#torch.from_numpy) | [paddle.to\_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/to_tensor_cn.html#to-tensor) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.from_numpy.md) |
| 6 | [torch.zeros](https://pytorch.org/docs/stable/generated/torch.zeros.html?highlight=zeros#torch.zeros) | [paddle.zeros](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/zeros_cn.html#zeros) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.zeros.md) |
| 7 | [torch.zeros_like](https://pytorch.org/docs/stable/generated/torch.zeros_like.html?highlight=zeros_like#torch.zeros_like) | [paddle.zeros_like](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/zeros_like_cn.html#zeros-like) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.zeros_like.md) |
| 8 | [torch.ones](https://pytorch.org/docs/stable/generated/torch.ones.html?highlight=ones#torch.ones) | [paddle.ones](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/ones_cn.html#ones) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.ones.md) |
| 9 | [torch.ones_like](https://pytorch.org/docs/stable/generated/torch.zeros_like.html?highlight=zeros_like#torch.zeros_like) | [paddle.ones_like](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/ones_like_cn.html#ones-like) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.ones_like.md) |
| 10 | [torch.empty](https://pytorch.org/docs/stable/generated/torch.empty.html?highlight=empty#torch.empty) | [paddle.empty](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/empty_cn.html#empty) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.empty.md) |
| 11 | [torch.empty_like](https://pytorch.org/docs/stable/generated/torch.empty_like.html?highlight=empty_like#torch.empty_like) | [paddle.empty_like](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/empty_like_cn.html#empty-like) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.empty_like.md) |
| 12 | [torch.full](https://pytorch.org/docs/stable/generated/torch.full.html?highlight=full#torch.full) | [paddle.full](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/full_cn.html#full) | 功能一致,[参数不一致](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.full.md) |
| 13 | [torch.full_like](https://pytorch.org/docs/stable/generated/torch.full_like.html?highlight=full_like#torch.full_like) | [paddle.full_like](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/full_like_cn.html#full-like) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.full_like.md) |
| 14 | [torch.arange](https://pytorch.org/docs/stable/generated/torch.arange.html?highlight=arange#torch.arange) | [paddle.arange](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/arange_cn.html#arange) | 功能一致,[参数不一致](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.arange.md) |
| 15 | [torch.range](https://pytorch.org/docs/stable/generated/torch.range.html?highlight=range#torch.range) | [paddle.arange](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/arange_cn.html#arange) | 功能一致,[参数不一致](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.range.md) |
| 16 | [torch.linspace](https://pytorch.org/docs/stable/generated/torch.linspace.html?highlight=linspace#torch.linspace) | [paddle.linspace](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/linspace_cn.html#linspace) | 功能一致,[参数不一致](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.linspace.md) |
| 17 | [torch.eye](https://pytorch.org/docs/stable/generated/torch.eye.html?highlight=eye#torch.eye) | [paddle.eye](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/eye_cn.html#eye) | 功能一致,[参数不一致](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.eye.md) |
| 18 | [torch.cat](https://pytorch.org/docs/stable/generated/torch.cat.html?highlight=torch%20cat#torch.cat) | [paddle.concat](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/concat_cn.html#concat) | 功能一致,参数名不一致 |
| 19 | [torch.chunk](https://pytorch.org/docs/stable/generated/torch.chunk.html?highlight=chunk#torch.chunk) | [paddle.chunk](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/chunk_cn.html#chunk) | 功能一致,参数名不一致 |
| 20 | [torch.gather](https://pytorch.org/docs/stable/generated/torch.gather.html?highlight=gather#torch.gather) | [paddle.gather](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/gather_cn.html#gather) | [差异对比](https://github.com/PaddlePaddle/X2Paddle/tree/develop/docs/pytorch_project_convertor/API_docs/ops/torch.gather.md) |
| 21 | [torch.index\_select](https://pytorch.org/docs/stable
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Deep_learning_model_converter_for_PaddlePaddle._(『_X2Paddle.zip (1254个子文件)
Dockerfile 1KB
.gitignore 403B
.copyright.hook 4KB
pytorch2paddle.ipynb 7KB
tensorflow2paddle.ipynb 6KB
gcim.jpg 2.46MB
config_16k_.json 631B
LICENSE 11KB
README.md 49KB
README.md 19KB
add_api.md 13KB
README.md 11KB
README-CN.md 10KB
x2paddle_model_zoo.md 10KB
supported_API.md 9KB
get_started.md 9KB
op_list.md 8KB
README.md 8KB
add_caffe_custom_layer.md 8KB
README.md 8KB
README.md 7KB
HuggingFace2paddle.md 6KB
convert2lite_api.md 5KB
torchvision.models.md 5KB
CODE_OF_CONDUCT.md 5KB
torchvision.transforms.ToPILImage.md 4KB
stargan.md 4KB
MMDetection2paddle.md 4KB
torch.utils.data.DataLoader.md 4KB
README.md 4KB
torchvision.utils.save_image.md 4KB
export_tf_model.md 4KB
ultra_light_fast_generic_face_detector.md 4KB
pytorch2paddle.md 4KB
x2paddle_api.md 4KB
torch.nn.MaxUnpool3d.md 3KB
README.cn.md 3KB
torch.gather.md 3KB
torch.nn.Conv3d.md 3KB
torch.unique.md 3KB
torch.nn.MaxUnpool2d.md 3KB
README.md 3KB
torch.nn.Conv2d.md 3KB
torch.nn.BatchNorm3d.md 3KB
torch.nn.BatchNorm1d.md 3KB
torch.nn.BatchNorm2d.md 3KB
torch.nn.MaxUnpool1d.md 3KB
torch.nn.KLDivLoss.md 3KB
README.md 2KB
torch.scatter.md 2KB
FAQ.md 2KB
README.md 2KB
README.md 2KB
torch.nn.LSTM.md 2KB
README.md 2KB
torch.nn.ConvTranspose1d.md 2KB
torch.nn.ConvTranspose3d.md 2KB
torch.nn.ConvTranspose2d.md 2KB
torch.split.md 2KB
torch.nn.ReplicationPad3d.md 2KB
torch.nn.ConstantPad3d.md 2KB
torch.nn.ConstantPad2d.md 2KB
torch.empty.md 2KB
torch.nn.ReplicationPad2d.md 2KB
torch.nn.ReflectionPad2d.md 2KB
torch.nn.CrossEntropyLoss.md 2KB
torch.nn.ReplicationPad1d.md 2KB
torch.nn.ReflectionPad1d.md 2KB
torch.nn.parameter.Parameter.md 2KB
torch.trace.md 2KB
torch.nn.GRU.md 2KB
torch.nn.ConstantPad1d.md 2KB
torch.randn.md 2KB
torch.rand.md 2KB
torch.divide.md 2KB
torch.div.md 2KB
torch.zeros.md 2KB
torch.save.md 2KB
torch.ones.md 2KB
torch.nn.utils.clip_grad_value_.md 2KB
torch.nn.DataParallel.md 2KB
torch.optim.lr_scheduler.LRScheduler.md 2KB
torch.randint.md 2KB
torch.nn.Conv1d.md 2KB
torch.randperm.md 2KB
torch.narrow.md 2KB
after_convert.md 1KB
torch.load.md 1KB
torch.normal.md 1KB
torch.utils.data.random_split.md 1KB
FAQ.md 1KB
torch.nn.Dropout.md 1KB
torch.full_like.md 1KB
torch.eye.md 1KB
torch.empty_like.md 1KB
before_convert.md 1KB
torchvision.transforms.Normalize.md 1KB
torch.nn.Embedding.md 1KB
torch.zeros_like.md 1KB
README.ncnn.md 1KB
共 1254 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13
资源评论
普通网友
- 粉丝: 0
- 资源: 510
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- java制造业MES生产管理系统源码 MES源码数据库 MySQL源码类型 WebForm
- 基于无人机航拍数据实现的三维场景重建python源代码+文档说明+数据集(高分项目)
- 【重磅,更新!】全国2000-2022年植被指数数据(分辨率30m)
- 包含Qt5Core.dll Qt5Gui.dll Qt5Network.dll Qt5Svg.dll Qt5Widgets.dl
- python3.6 get-pip.py
- python期末大作业基于ResNet的人脸表情识别项目源码+数据集+模型文件(高分项目)
- C#大型多门店4S连锁汽车维修保养管理系统源码(带文档)数据库 SQL2008源码类型 WebForm
- 【安卓毕业设计】基于Android健康检测系统的设计与实现源码(完整前后端+mysql+说明文档).zip
- 【重磅,更新!】中国分省农户创业活动农户创业活跃度(2011-2021年)
- YOLOv5 PyTorch 格式注释番茄叶病检测数据集下载
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功