Pytorch 2.1.0 与 Paddle develop API 映射表

本文梳理了 Pytorch 最新发行版(当前 v2.1.0) API 与 PaddlePaddle develop 版本 API 对应关系与差异分析。通过本文档,帮助开发者快速迁移 PyTorch 使用经验,完成模型的开发与调优。

贡献代码

欢迎你向我们贡献代码,关于如何编写 API 映射关系,为保证文档格式统一性与可读性,请严格参照 API 映射关系-格式与模板 来编写。

API 映射表目录

类别 简介
torch.XX 主要为torch.XX类 API
torch.nn.XX 主要为torch.nn.XX类 API
torch.nn.functional.XX 主要为torch.nn.functional.XX类 API
torch.nn.init.XX 主要为torch.nn.init.XX类 API
torch.nn.utils.XX 主要为torch.nn.utils.XX类 API
torch.nn.Module.XX 主要为torch.nn.Module.XX类 API
torch.Tensor.XX 主要为torch.Tensor.XX类 API
torch.autograd.XX 主要为torch.autograd.XX类 API
torch.cuda.XX 主要为torch.cuda.XX类 API
torch.distributed.XX 主要为torch.distributed.XX类 API
torch.distributions.XX 主要为torch.distributions.XX类 API
torch.fft.XX 主要为torch.fft.XX类 API
torch.hub.XX 主要为torch.hub.XX类 API
torch.linalg.XX 主要为torch.linalg.XX类 API
torch.onnx.XX 主要为torch.onnx.XX类 API
torch.profiler.XX 主要为torch.profiler.XX类 API
torch.optim.XX 主要为torch.optim.XX类 API
torch.sparse.XX 主要为torch.sparse.XX类 API
其他 其他 API

torch.XX API 映射列表

梳理了torch.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.abs paddle.abs 功能一致,torch 参数更多,差异对比
2 torch.absolute paddle.abs 功能一致,torch 参数更多,差异对比
3 torch.acos paddle.acos 功能一致,torch 参数更多,差异对比
4 torch.add paddle.add 功能一致,torch 参数更多,差异对比
5 torch.addmv 组合替代实现,差异对比
6 torch.addr 组合替代实现,差异对比
7 torch.all paddle.all 功能一致,参数不一致,差异对比
8 torch.allclose paddle.allclose 功能一致,仅参数名不一致,差异对比
9 torch.any paddle.any 功能一致,参数不一致,差异对比
10 torch.arange paddle.arange 功能一致,torch 参数更多,差异对比
11 torch.arccos paddle.acos 功能一致,torch 参数更多,差异对比
12 torch.arcsin paddle.asin 功能一致,torch 参数更多,差异对比
13 torch.arctan paddle.atan 功能一致,torch 参数更多,差异对比
14 torch.argmax paddle.argmax 功能一致,仅参数名不一致,差异对比
15 torch.argmin paddle.argmin 功能一致,仅参数名不一致,差异对比
16 torch.asin paddle.asin 功能一致,torch 参数更多,差异对比
17 torch.as_tensor paddle.to_tensor 功能一致,仅参数名不一致,差异对比
18 torch.atan paddle.atan 功能一致,torch 参数更多,差异对比
19 torch.baddbmm 组合替代实现,差异对比
20 torch.bernoulli paddle.bernoulli 功能一致,torch 参数更多,差异对比
21 torch.bincount paddle.bincount 功能一致,仅参数名不一致,差异对比
22 torch.broadcast_tensors paddle.broadcast_tensors 功能一致,参数不一致,差异对比
23 torch.broadcast_to paddle.broadcast_to 功能一致,仅参数名不一致,差异对比
24 torch.cat paddle.concat 功能一致,torch 参数更多,差异对比
25 torch.ceil paddle.ceil 功能一致,torch 参数更多,差异对比
26 torch.chain_matmul 组合替代实现,差异对比
27 torch.cholesky_inverse 组合替代实现,差异对比
28 torch.cholesky_solve paddle.linalg.cholesky_solve 功能一致,仅参数名不一致,差异对比
29 torch.chunk paddle.chunk 功能一致,仅参数名不一致,差异对比
30 torch.clamp paddle.clip 功能一致,torch 参数更多,差异对比
31 torch.conj paddle.conj 功能一致,仅参数名不一致,差异对比
32 torch.corrcoef paddle.linalg.corrcoef 功能一致,仅参数名不一致,差异对比
33 torch.cos paddle.cos 功能一致,torch 参数更多,差异对比
34 torch.cosh paddle.cosh 功能一致,torch 参数更多,差异对比
35 torch.count_nonzero paddle.count_nonzero 功能一致,仅 paddle 参数更多,差异对比
36 torch.cov paddle.linalg.cov 功能一致,仅 paddle 参数更多,差异对比
37 torch.det paddle.linalg.det 功能一致,仅参数名不一致,差异对比
38 torch.diag paddle.diag 功能一致,torch 参数更多,差异对比
39 torch.diagflat paddle.diagflat 功能一致,仅参数名不一致,差异对比
40 torch.diagonal paddle.diagonal 功能一致,仅参数名不一致,差异对比
41 torch.diff paddle.diff 功能一致,参数不一致,差异对比
42 torch.dist paddle.dist 功能一致,仅参数名不一致,差异对比
43 torch.div paddle.divide 功能一致,torch 参数更多,差异对比
44 torch.divide paddle.divide 功能一致,torch 参数更多,差异对比
45 torch.empty paddle.empty 功能一致,torch 参数更多,差异对比
46 torch.empty_like paddle.empty_like 功能一致,torch 参数更多,差异对比
47 torch.equal paddle.equal_all 功能一致,返回参数类型不一致,差异对比
48 torch.erf paddle.erf 功能一致,torch 参数更多,差异对比
49 torch.exp paddle.exp 功能一致,torch 参数更多,差异对比
50 torch.eye paddle.eye 功能一致,torch 参数更多,差异对比
51 torch.flatten paddle.flatten 功能一致,仅参数名不一致,差异对比
52 torch.flip paddle.flip 功能一致,仅参数名不一致,差异对比
53 torch.fliplr paddle.flip 功能一致,仅 paddle 参数更多,差异对比
54 torch.flipud paddle.flip 功能一致,参数不一致,差异对比
55 torch.floor paddle.floor 功能一致,torch 参数更多,差异对比
56 torch.floor_divide paddle.floor_divide 功能一致,参数不一致,差异对比
57 torch.fmod paddle.mod 功能一致,torch 参数更多,差异对比
58 torch.from_numpy paddle.to_tensor 功能一致,仅参数名不一致,差异对比
59 torch.full paddle.full 功能一致,torch 参数更多,差异对比
60 torch.full_like paddle.full_like 功能一致,torch 参数更多,差异对比
61 torch.gather paddle.take_along_axis 功能一致,torch 参数更多,差异对比
62 torch.imag paddle.imag 功能一致,仅参数名不一致,差异对比
63 torch.index_select paddle.index_select 功能一致,torch 参数更多,差异对比
64 torch.isclose paddle.isclose 功能一致,仅参数名不一致,差异对比
65 torch.isfinite paddle.isfinite 功能一致,仅参数名不一致,差异对比
66 torch.isinf paddle.isinf 功能一致,仅参数名不一致,差异对比
67 torch.isnan paddle.isnan 功能一致,仅参数名不一致,差异对比
68 torch.istft paddle.signal.istft 功能一致,仅参数名不一致,差异对比
69 torch.is_complex paddle.is_complex 功能一致,仅参数名不一致,差异对比
70 torch.is_floating_point paddle.is_floating_point 功能一致,仅参数名不一致,差异对比
71 torch.is_tensor paddle.is_tensor 功能一致,仅参数名不一致,差异对比
72 torch.kthvalue paddle.kthvalue 功能一致,仅参数名不一致,差异对比
73 torch.linalg.lstsq paddle.linalg.lstsq 功能一致,仅参数名不一致,差异对比
74 torch.linspace paddle.linspace 功能一致,torch 参数更多,差异对比
75 torch.load paddle.load 功能一致,torch 参数更多,差异对比
76 torch.log paddle.log 功能一致,torch 参数更多,差异对比
77 torch.log10 paddle.log10 功能一致,torch 参数更多,差异对比
78 torch.log1p paddle.log1p 功能一致,torch 参数更多,差异对比
79 torch.log2 paddle.log2 功能一致,torch 参数更多,差异对比
80 torch.logical_and paddle.logical_and 功能一致,仅参数名不一致,差异对比
81 torch.logical_not paddle.logical_not 功能一致,仅参数名不一致,差异对比
82 torch.logical_or paddle.logical_or 功能一致,仅参数名不一致,差异对比
83 torch.logical_xor paddle.logical_xor 功能一致,仅参数名不一致,差异对比
84 torch.masked_select paddle.masked_select 功能一致,torch 参数更多,差异对比
85 torch.matmul paddle.matmul 功能一致,torch 参数更多,差异对比
86 torch.max paddle.max 功能一致,参数不一致,差异对比
87 torch.median paddle.median 功能一致,参数不一致,差异对比
88 torch.min paddle.min 功能一致,参数不一致,差异对比
89 torch.mm paddle.matmul 功能一致,torch 参数更多,差异对比
90 torch.moveaxis paddle.moveaxis 功能一致,仅参数名不一致,差异对比
91 torch.movedim paddle.movedim 功能一致,仅参数名不一致,差异对比
92 torch.mul paddle.multiply 功能一致,torch 参数更多,差异对比
93 torch.multinomial paddle.multinomial 功能一致,torch 参数更多,差异对比
94 torch.multiply paddle.multiply 功能一致,参数不一致,差异对比
95 torch.mv paddle.mv 功能一致,torch 参数更多,差异对比
96 torch.nanmedian paddle.nanmedian 功能一致,torch 参数更多,差异对比
97 torch.narrow paddle.slice 功能一致,参数不一致,差异对比
98 torch.nonzero paddle.nonzero 功能一致,torch 参数更多,差异对比
99 torch.normal paddle.normal 功能一致,torch 参数更多,差异对比
100 torch.numel paddle.Tensor.size 功能一致,torch 参数更多,差异对比
101 torch.ones paddle.ones 功能一致,参数不一致,差异对比
102 torch.ones_like paddle.ones_like 功能一致,torch 参数更多,差异对比
103 torch.permute paddle.transpose 功能一致,仅参数名不一致,差异对比
104 torch.pinverse paddle.linalg.pinv 功能一致,仅参数名不一致,差异对比
105 torch.pow paddle.pow 功能一致,torch 参数更多,差异对比
106 torch.prod paddle.prod 功能一致,仅参数名不一致,差异对比
107 torch.rand paddle.rand 功能一致,参数不一致,差异对比
108 torch.randint paddle.randint 功能一致,torch 参数更多,差异对比
109 torch.randn paddle.randn 功能一致,参数不一致,差异对比
110 torch.randperm paddle.randperm 功能一致,torch 参数更多,差异对比
111 torch.range paddle.arange 功能一致,torch 参数更多,差异对比
112 torch.ravel paddle.flatten 功能一致,仅参数名不一致,差异对比
113 torch.real paddle.real 功能一致,仅参数名不一致,差异对比
114 torch.reciprocal paddle.reciprocal 功能一致,torch 参数更多,差异对比
115 torch.remainder paddle.remainder 功能一致,torch 参数更多,差异对比
116 torch.reshape paddle.reshape 功能一致,仅参数名不一致,差异对比
117 torch.roll paddle.roll 功能一致,仅参数名不一致,差异对比
118 torch.rot90 paddle.rot90 功能一致,仅参数名不一致,差异对比
119 torch.round paddle.round 功能一致,torch 参数更多,差异对比
120 torch.rsqrt paddle.rsqrt 功能一致,torch 参数更多,差异对比
121 torch.save paddle.save 功能一致,torch 参数更多,差异对比
122 torch.scatter paddle.put_along_axis 功能一致,torch 参数更多,差异对比
123 torch.sign paddle.sign 功能一致,torch 参数更多,差异对比
124 torch.sin paddle.sin 功能一致,torch 参数更多,差异对比
125 torch.sinh paddle.sinh 功能一致,torch 参数更多,差异对比
126 torch.slogdet paddle.linalg.slogdet 功能一致,参数不一致,差异对比
127 torch.split paddle.split 功能一致,参数不一致,差异对比
128 torch.sqrt paddle.sqrt 功能一致,torch 参数更多,差异对比
129 torch.squeeze paddle.squeeze 功能一致,仅参数名不一致,差异对比
130 torch.stack paddle.stack 功能一致,torch 参数更多,差异对比
131 torch.std_mean 组合替代实现,差异对比
132 torch.sub paddle.subtract 功能一致,torch 参数更多,差异对比
133 torch.subtract paddle.subtract 功能一致,torch 参数更多,差异对比
134 torch.sum paddle.sum 功能一致,仅参数名不一致,差异对比
135 torch.take paddle.take 功能一致,仅参数名不一致,差异对比
136 torch.tensor paddle.to_tensor 功能一致,torch 参数更多,差异对比
137 torch.tile paddle.tile 功能一致,仅参数名不一致,差异对比
138 torch.trace paddle.trace 功能一致,仅参数名不一致,差异对比
139 torch.transpose paddle.transpose 功能一致,参数不一致,差异对比
140 torch.unbind paddle.unbind 功能一致,仅参数名不一致,差异对比
141 torch.unique paddle.unique 功能一致,torch 参数更多,差异对比
142 torch.unique_consecutive paddle.unique_consecutive 功能一致,仅 paddle 参数更多,差异对比
143 torch.unsqueeze paddle.unsqueeze 功能一致,仅参数名不一致,差异对比
144 torch.var_mean 组合替代实现,差异对比
145 torch.view_as_complex paddle.as_complex 功能一致,仅参数名不一致,差异对比
146 torch.view_as_real paddle.as_real 功能一致,仅参数名不一致,差异对比
147 torch.zeros paddle.zeros 功能一致,参数不一致,差异对比
148 torch.zeros_like paddle.zeros_like 功能一致,torch 参数更多,差异对比
149 torch.meshgrid paddle.meshgrid 功能一致,torch 参数更多,差异对比
150 torch.sigmoid paddle.nn.functional.sigmoid 功能一致,torch 参数更多,差异对比
151 torch.set_default_dtype paddle.set_default_dtype 功能一致,参数完全一致,差异对比
152 torch.get_default_dtype paddle.get_default_dtype 功能一致,无参数,差异对比
153 torch.t paddle.t 功能一致,参数完全一致,差异对比
154 torch.where paddle.where 功能一致,torch 参数更多,差异对比
155 torch.manual_seed paddle.seed 功能一致,参数完全一致,差异对比
156 torch.no_grad paddle.no_grad 功能一致,仅参数名不一致,差异对比
157 torch.set_grad_enabled paddle.set_grad_enabled 功能一致,参数完全一致,差异对比
158 torch.diag_embed paddle.diag_embed 功能一致,参数完全一致,差异对比
159 torch.is_grad_enabled paddle.is_grad_enabled 功能一致,无参数,差异对比
160 torch.nansum paddle.nansum 功能一致,仅 paddle 参数更多,差异对比
161 torch.svd_lowrank paddle.linalg.svd 功能一致,torch 参数更多,差异对比
162 torch.symeig paddle.linalg.eigh 功能一致,torch 参数更多,差异对比
163 torch.addcdiv 组合替代实现,差异对比
164 torch.addcmul 组合替代实现,差异对比
165 torch.get_rng_state paddle.get_rng_state 功能一致,参数不一致,差异对比
166 torch.heaviside paddle.heaviside 功能一致,torch 参数更多,差异对比
167 torch.is_nonzero 组合替代实现,差异对比
168 torch.polar 组合替代实现,差异对比
169 torch.rand_like 组合替代实现,差异对比
170 torch.seed 组合替代实现,差异对比
171 torch.set_printoptions paddle.set_printoptions 功能一致,torch 参数更多,差异对比
172 torch.set_rng_state paddle.set_rng_state 功能一致,参数不一致,差异对比
173 torch.swapaxes paddle.transpose 功能一致,参数不一致,差异对比
174 torch.swapdims paddle.transpose 功能一致,参数不一致,差异对比
175 torch.arcsinh paddle.asinh 功能一致,torch 参数更多,差异对比
176 torch.arctanh paddle.atanh 功能一致,torch 参数更多,差异对比
177 torch.asinh paddle.asinh 功能一致,torch 参数更多,差异对比
178 torch.atan2 paddle.atan2 功能一致,torch 参数更多,差异对比
179 torch.atanh paddle.atanh 功能一致,torch 参数更多,差异对比
180 torch.bitwise_not paddle.bitwise_not 功能一致,仅参数名不一致,差异对比
181 torch.bitwise_and paddle.bitwise_and 功能一致,仅参数名不一致,差异对比
182 torch.bitwise_or paddle.bitwise_or 功能一致,仅参数名不一致,差异对比
183 torch.bitwise_xor paddle.bitwise_xor 功能一致,仅参数名不一致,差异对比
184 torch.clip paddle.clip 功能一致,torch 参数更多,差异对比
185 torch.deg2rad paddle.deg2rad 功能一致,torch 参数更多,差异对比
186 torch.digamma paddle.digamma 功能一致,torch 参数更多,差异对比
187 torch.erfinv paddle.erfinv 功能一致,torch 参数更多,差异对比
188 torch.expm1 paddle.expm1 功能一致,torch 参数更多,差异对比
189 torch.fix paddle.trunc 功能一致,torch 参数更多,差异对比
190 torch.trunc paddle.trunc 功能一致,torch 参数更多,差异对比
191 torch.acosh paddle.acosh 功能一致,torch 参数更多,差异对比
192 torch.arccosh paddle.acosh 功能一致,torch 参数更多,差异对比
193 torch.randint_like paddle.randint_like 功能一致,torch 参数更多,差异对比
194 torch.logspace paddle.logspace 功能一致,torch 参数更多,差异对比
195 torch.gcd paddle.gcd 功能一致,torch 参数更多,差异对比
196 torch.histc paddle.histogram 功能一致,参数不一致,差异对比
197 torch.kron paddle.kron 功能一致,仅参数名不一致,差异对比
198 torch.lcm paddle.lcm 功能一致,torch 参数更多,差异对比
199 torch.logcumsumexp paddle.logcumsumexp 功能一致,torch 参数更多,差异对比
200 torch.renorm paddle.renorm 功能一致,torch 参数更多,差异对比
201 torch.repeat_interleave paddle.repeat_interleave 功能一致,torch 参数更多,差异对比
202 torch.searchsorted paddle.searchsorted 功能一致,torch 参数更多,差异对比
203 torch.frac paddle.frac 功能一致,torch 参数更多,差异对比
204 torch.lerp paddle.lerp 功能一致,torch 参数更多,差异对比
205 torch.lgamma paddle.lgamma 功能一致,torch 参数更多,差异对比
206 torch.logit paddle.logit 功能一致,torch 参数更多,差异对比
207 torch.nan_to_num paddle.nan_to_num 功能一致,torch 参数更多,差异对比
208 torch.neg paddle.neg 功能一致,torch 参数更多,差异对比
209 torch.negative paddle.neg 功能一致,torch 参数更多,差异对比
210 torch.rad2deg paddle.rad2deg 功能一致,torch 参数更多,差异对比
211 torch.fmax paddle.fmax 功能一致,torch 参数更多,差异对比
212 torch.fmin paddle.fmin 功能一致,torch 参数更多,差异对比
213 torch.greater paddle.greater_than 功能一致,torch 参数更多,差异对比
214 torch.le paddle.less_equal 功能一致,参数不一致,差异对比
215 torch.less paddle.less_than 功能一致,torch 参数更多,差异对比
216 torch.less_equal paddle.less_equal 功能一致,参数不一致,差异对比
217 torch.lt paddle.less_than 功能一致,torch 参数更多,差异对比
218 torch.maximum paddle.maximum 功能一致,torch 参数更多,差异对比
219 torch.minimum paddle.minimum 功能一致,torch 参数更多,差异对比
220 torch.addmm paddle.addmm 功能一致,torch 参数更多,差异对比
221 torch.bmm paddle.bmm 功能一致,torch 参数更多,差异对比
222 torch.cholesky paddle.linalg.cholesky 功能一致,torch 参数更多,差异对比
223 torch.tensordot paddle.tensordot 功能一致,torch 参数更多,差异对比
224 torch.tril paddle.tril 功能一致,torch 参数更多,差异对比
225 torch.tril_indices paddle.tril_indices 功能一致,torch 参数更多,差异对比
226 torch.triu paddle.triu 功能一致,torch 参数更多,差异对比
227 torch.triu_indices paddle.triu_indices 功能一致,torch 参数更多,差异对比
228 torch.dot paddle.dot 功能一致,torch 参数更多,差异对比
229 torch.ger paddle.outer 功能一致,torch 参数更多,差异对比
230 torch.inner paddle.inner 功能一致,torch 参数更多,差异对比
231 torch.inverse paddle.linalg.inv 功能一致,torch 参数更多,差异对比
232 torch.lu paddle.linalg.lu 功能一致,torch 参数更多,差异对比
233 torch.lu_unpack paddle.linalg.lu_unpack 功能一致,torch 参数更多,差异对比
234 torch.matrix_power paddle.linalg.matrix_power 功能一致,torch 参数更多,差异对比
235 torch.outer paddle.outer 功能一致,torch 参数更多,差异对比
236 torch.qr paddle.linalg.qr 功能一致,torch 参数更多,差异对比
237 torch.svd paddle.linalg.svd 功能一致,torch 参数更多,差异对比
238 torch.svd_lowrank paddle.linalg.svd 功能一致,torch 参数更多,差异对比
239 torch.symeig paddle.linalg.eigh 功能一致,torch 参数更多,差异对比
240 torch.cross paddle.cross 功能一致,torch 参数更多,差异对比
241 torch.clone paddle.clone 功能一致,torch 参数更多,差异对比
242 torch.cumprod paddle.cumprod 功能一致,torch 参数更多,差异对比
243 torch.cumsum paddle.cumsum 功能一致,torch 参数更多,差异对比
244 torch.ne paddle.not_equal 功能一致,torch 参数更多,差异对比
245 torch.not_equal paddle.not_equal 功能一致,torch 参数更多,差异对比
246 torch.sort paddle.sort 功能一致,参数不一致,差异对比
247 torch.stft paddle.signal.stft 功能一致,torch 参数更多,差异对比
248 torch.topk paddle.topk 功能一致,参数不一致,差异对比
249 torch.frexp paddle.frexp 功能一致,torch 参数更多,差异对比
250 torch.nanmean paddle.nanmean 功能一致,torch 参数更多,差异对比
251 torch.take_along_dim paddle.take_along_axis 功能一致,torch 参数更多,差异对比
252 torch.diagonal_scatter paddle.diagonal_scatter 功能一致,仅参数名不一致,差异对比
253 torch.geqrf 功能缺失
254 torch.bitwise_right_shift 功能缺失
255 torch.is_conj 功能缺失
256 torch.select_scatter 功能缺失
257 torch.slice_scatter 功能缺失
258 torch.scatter_reduce 功能缺失
259 torch.set_deterministic_debug_mode 功能缺失
260 torch.get_deterministic_debug_mode 功能缺失
261 torch.vsplit paddle.vsplit 功能一致,仅参数名不一致,差异对比
262 torch.hsplit paddle.hsplit 功能一致,仅参数名不一致,差异对比
263 torch.dsplit paddle.dsplit 功能一致,仅参数名不一致,差异对比
264 torch.tensor_split paddle.tensor_split 功能一致,仅参数名不一致,差异对比
265 torch.histogram 功能缺失
266 torch.gradient 功能缺失
267 torch.positive 功能缺失
268 torch.resolve_neg 功能缺失
269 torch.bitwise_left_shift 功能缺失
270 torch.isin 功能缺失
271 torch.addbmm 组合替代实现,差异对比
272 torch.adjoint 组合替代实现,差异对比
273 torch.aminmax 组合替代实现,差异对比
274 torch.arctan2 paddle.atan2 功能一致,torch 参数更多,差异对比
275 torch.argsort paddle.argsort 功能一致,torch 参数更多,差异对比
276 torch.argwhere paddle.nonzero 功能一致,仅 paddle 参数更多,差异对比
277 torch.asarray paddle.to_tensor 功能一致,torch 参数更多,差异对比
278 torch.broadcast_shapes paddle.broadcast_shape 功能一致,参数不一致,差异对比
279 torch.bucketize paddle.bucketize 功能一致,torch 参数更多,差异对比
280 torch.cdist paddle.cdist 功能一致,仅参数名不一致,差异对比
281 torch.clamp_min paddle.clip 功能一致,torch 参数更多,差异对比
282 torch.concat paddle.concat 功能一致,torch 参数更多,差异对比
283 torch.column_stack paddle.column_stack 功能一致,仅参数名不一致,差异对比
284 torch.row_stack paddle.row_stack 功能一致,仅参数名不一致,差异对比
285 torch.hstack paddle.hstack 功能一致,仅参数名不一致,差异对比
286 torch.vstack paddle.vstack 功能一致,仅参数名不一致,差异对比
287 torch.dstack paddle.dstack 功能一致,仅参数名不一致,差异对比
288 torch.conj_physical paddle.conj 功能一致,torch 参数更多,差异对比
289 torch.copysign 组合替代实现,差异对比
290 torch.cosine_similarity paddle.nn.functional.cosine_similarity 功能一致,仅参数名不一致,差异对比
291 torch.cummin paddle.cummin 功能一致,torch 参数更多,差异对比
292 torch.cumulative_trapezoid paddle.cumulative_trapezoid 功能一致,仅参数名不一致,差异对比
293 torch.einsum paddle.einsum 功能一致,参数完全一致,差异对比
294 torch.enable_grad paddle.enable_grad 功能一致,无参数,差异对比
295 torch.erfc 组合替代实现,差异对比
296 torch.exp2 组合替代实现,差异对比
297 torch.from_dlpack paddle.utils.dlpack.from_dlpack 功能一致,仅参数名不一致,差异对比
298 torch.hypot paddle.hypot 功能一致,torch 参数更多,差异对比
299 torch.i0 paddle.i0 功能一致,torch 参数更多,差异对比
300 torch.index_add paddle.index_add 功能一致,torch 参数更多,差异对比
301 torch.xlogy 组合替代实现,差异对比
302 torch.ldexp 组合替代实现,差异对比
303 torch.logaddexp 组合替代实现,差异对比
304 torch.logaddexp2 组合替代实现,差异对比
305 torch.logdet 组合替代实现,差异对比
306 torch.msort paddle.sort 功能一致,torch 参数更多,差异对比
307 torch.narrow_copy 组合替代实现,差异对比
308 torch.nextafter paddle.nextafter 功能一致,torch 参数更多,差异对比
309 torch.poisson paddle.poisson 功能一致,torch 参数更多,差异对比
310 torch.polygamma paddle.polygamma 功能一致,torch 参数更多,差异对比
311 torch.quantile paddle.quantile 功能一致,torch 参数更多,差异对比
312 torch.randn_like 组合替代实现,差异对比
313 torch.relu paddle.nn.functional.relu 功能一致,仅参数名不一致,差异对比
314 torch.scalar_tensor paddle.to_tensor 功能一致,torch 参数更多,差异对比
315 torch.scatter_add paddle.put_along_axis 功能一致,仅 paddle 参数更多,差异对比
316 torch.select 组合替代实现,差异对比
317 torch.sgn paddle.sgn 功能一致,torch 参数更多,差异对比
318 torch.sinc 组合替代实现,差异对比
319 torch.sparse_coo_tensor paddle.sparse.sparse_coo_tensor 功能一致,参数不一致,差异对比
320 torch.sparse_csr_tensor paddle.sparse.sparse_csr_tensor 功能一致,torch 参数更多,差异对比
321 torch.square paddle.square 功能一致,torch 参数更多,差异对比
322 torch.trapezoid paddle.trapezoid 功能一致,仅参数名不一致,差异对比
323 torch.triangular_solve paddle.linalg.triangular_solve 功能一致,torch 参数更多,差异对比
324 torch.unflatten paddle.reshape 功能一致,参数不一致,差异对比
325 torch.vander paddle.vander 功能一致,仅参数名不一致,差异对比
326 torch.vdot paddle.dot 功能一致,torch 参数更多,差异对比
327 torch.resolve_conj 功能缺失
328 torch.layout 功能缺失
329 torch.testing.assert_close 组合替代实现,差异对比
330 torch.__version__ paddle.__version__ 功能一致,无参数,差异对比
331 torch.get_default_dtype paddle.get_default_dtype 功能一致,无参数,差异对比
332 torch.is_grad_enabled paddle.is_grad_enabled 功能一致,无参数,差异对比
333 torch.manual_seed paddle.seed 功能一致,参数完全一致,差异对比
334 torch.can_cast 功能缺失
335 torch.atleast_1d paddle.atleast_1d 功能一致,参数不一致,差异对比
336 torch.atleast_2d paddle.atleast_2d 功能一致,参数不一致,差异对比
337 torch.atleast_3d paddle.atleast_3d 功能一致,参数不一致,差异对比

持续更新...

torch.nn.XX API 映射列表

梳理了torch.nn.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.nn.AdaptiveMaxPool1d paddle.nn.AdaptiveMaxPool1D 功能一致,仅参数名不一致,差异对比
2 torch.nn.AdaptiveMaxPool2d paddle.nn.AdaptiveMaxPool2D 功能一致,仅参数名不一致,差异对比
3 torch.nn.AdaptiveMaxPool3d paddle.nn.AdaptiveMaxPool3D 功能一致,仅参数名不一致,差异对比
4 torch.nn.AvgPool1d paddle.nn.AvgPool1D 功能一致,参数不一致,差异对比
5 torch.nn.AvgPool2d paddle.nn.AvgPool2D 功能一致,参数不一致,差异对比
6 torch.nn.AvgPool3d paddle.nn.AvgPool3D 功能一致,参数不一致,差异对比
7 torch.nn.BatchNorm1d paddle.nn.BatchNorm1D 功能一致,参数不一致,差异对比
8 torch.nn.BatchNorm2d paddle.nn.BatchNorm2D 功能一致,参数不一致,差异对比
9 torch.nn.BatchNorm3d paddle.nn.BatchNorm3D 功能一致,参数不一致,差异对比
10 torch.nn.BCELoss paddle.nn.BCELoss 功能一致,torch 参数更多,差异对比
11 torch.nn.BCEWithLogitsLoss paddle.nn.BCEWithLogitsLoss 功能一致,torch 参数更多,差异对比
12 torch.nn.ChannelShuffle paddle.nn.ChannelShuffle 功能一致,仅 paddle 参数更多,差异对比
13 torch.nn.ConstantPad1d paddle.nn.Pad1D 功能一致,仅 paddle 参数更多,差异对比
14 torch.nn.ConstantPad2d paddle.nn.Pad2D 功能一致,仅 paddle 参数更多,差异对比
15 torch.nn.ConstantPad3d paddle.nn.Pad3D 功能一致,仅 paddle 参数更多,差异对比
16 torch.nn.Conv1d paddle.nn.Conv1D 功能一致,参数不一致,差异对比
17 torch.nn.Conv2d paddle.nn.Conv2D 功能一致,参数不一致,差异对比
18 torch.nn.Conv3d paddle.nn.Conv3D 功能一致,参数不一致,差异对比
19 torch.nn.ConvTranspose1d paddle.nn.Conv1DTranspose 功能一致,参数不一致,差异对比
20 torch.nn.ConvTranspose2d paddle.nn.Conv2DTranspose 功能一致,参数不一致,差异对比
21 torch.nn.ConvTranspose3d paddle.nn.Conv3DTranspose 功能一致,参数不一致,差异对比
22 torch.nn.CosineSimilarity paddle.nn.CosineSimilarity 功能一致,仅参数名不一致,差异对比
23 torch.nn.CrossEntropyLoss paddle.nn.CrossEntropyLoss 功能一致,torch 参数更多,差异对比
24 torch.nn.DataParallel paddle.DataParallel 功能一致,参数不一致,差异对比
25 torch.nn.Dropout paddle.nn.Dropout 功能一致,torch 参数更多,差异对比
26 torch.nn.Dropout2d paddle.nn.Dropout2D 功能一致,torch 参数更多,差异对比
27 torch.nn.Dropout3d paddle.nn.Dropout3D 功能一致,torch 参数更多,差异对比
28 torch.nn.ELU paddle.nn.ELU 功能一致,torch 参数更多,差异对比
29 torch.nn.Embedding paddle.nn.Embedding 功能一致,torch 参数更多,差异对比
30 torch.nn.Flatten paddle.nn.Flatten 功能一致,仅参数名不一致,差异对比
31 torch.nn.Fold paddle.nn.Fold 功能一致,仅参数名不一致,差异对比
32 torch.nn.GRU paddle.nn.GRU 功能一致,参数不一致,差异对比
33 torch.nn.Hardshrink paddle.nn.Hardshrink 功能一致,仅参数名不一致,差异对比
34 torch.nn.Hardsigmoid paddle.nn.Hardsigmoid 功能一致,torch 参数更多,差异对比
35 torch.nn.KLDivLoss paddle.nn.KLDivLoss 功能一致,torch 参数更多,差异对比
36 torch.nn.L1Loss paddle.nn.L1Loss 功能一致,torch 参数更多,差异对比
37 torch.nn.LeakyReLU paddle.nn.LeakyReLU 功能一致,torch 参数更多,差异对比
38 torch.nn.Linear paddle.nn.Linear 功能一致,参数不一致,差异对比
39 torch.nn.LocalResponseNorm paddle.nn.LocalResponseNorm 功能一致,仅 paddle 参数更多,差异对比
40 torch.nn.LogSoftmax paddle.nn.LogSoftmax 功能一致,仅参数名不一致,差异对比
41 torch.nn.LSTM paddle.nn.LSTM 功能一致,参数不一致,差异对比
42 torch.nn.MaxPool1d paddle.nn.MaxPool1D 功能一致,torch 参数更多,差异对比
43 torch.nn.MaxPool2d paddle.nn.MaxPool2D 功能一致,torch 参数更多,差异对比
44 torch.nn.MaxPool3d paddle.nn.MaxPool3D 功能一致,torch 参数更多,差异对比
45 torch.nn.MaxUnpool1d paddle.nn.MaxUnPool1D 功能一致,仅 paddle 参数更多,差异对比
46 torch.nn.MaxUnpool2d paddle.nn.MaxUnPool2D 功能一致,仅 paddle 参数更多,差异对比
47 torch.nn.MaxUnpool3d paddle.nn.MaxUnPool3D 功能一致,仅 paddle 参数更多,差异对比
48 torch.nn.ModuleDict paddle.nn.LayerDict 功能一致,仅参数名不一致,差异对比
49 torch.nn.ModuleList paddle.nn.LayerList 功能一致,仅参数名不一致,差异对比
50 torch.nn.MSELoss paddle.nn.MSELoss 功能一致,torch 参数更多,差异对比
51 torch.nn.PairwiseDistance paddle.nn.PairwiseDistance 功能一致,仅参数名不一致,差异对比
52 torch.nn.ParameterList paddle.nn.ParameterList 功能一致,仅参数名不一致,差异对比
53 torch.nn.PixelShuffle paddle.nn.PixelShuffle 功能一致,仅 paddle 参数更多,差异对比
54 torch.nn.PixelUnshuffle paddle.nn.PixelUnshuffle 功能一致,仅 paddle 参数更多,差异对比
55 torch.nn.PReLU paddle.nn.PReLU 功能一致,参数不一致,差异对比
56 torch.nn.ReflectionPad1d paddle.nn.Pad1D 功能一致,参数不一致,差异对比
57 torch.nn.ReflectionPad2d paddle.nn.Pad2D 功能一致,参数不一致,差异对比
58 torch.nn.ReflectionPad3d paddle.nn.Pad3D 功能一致,参数不一致,差异对比
59 torch.nn.ReLU paddle.nn.ReLU 功能一致,torch 参数更多,差异对比
60 torch.nn.ReplicationPad1d paddle.nn.Pad1D 功能一致,参数不一致,差异对比
61 torch.nn.ReplicationPad2d paddle.nn.Pad2D 功能一致,参数不一致,差异对比
62 torch.nn.ReplicationPad3d paddle.nn.Pad3D 功能一致,参数不一致,差异对比
63 torch.nn.SmoothL1Loss paddle.nn.SmoothL1Loss 功能一致,torch 参数更多,差异对比
64 torch.nn.Softmax paddle.nn.Softmax 功能一致,仅参数名不一致,差异对比
65 torch.nn.Softshrink paddle.nn.Softshrink 功能一致,仅参数名不一致,差异对比
66 torch.nn.Unfold paddle.nn.Unfold 功能一致,参数不一致,差异对比
67 torch.nn.Upsample paddle.nn.Upsample 功能一致,仅 paddle 参数更多,差异对比
68 torch.nn.UpsamplingBilinear2d paddle.nn.UpsamplingBilinear2D 功能一致,仅 paddle 参数更多,差异对比
69 torch.nn.UpsamplingNearest2d paddle.nn.UpsamplingNearest2d 功能一致,仅 paddle 参数更多,差异对比
70 torch.nn.ZeroPad2d paddle.nn.ZeroPad2D 功能一致,仅 paddle 参数更多,差异对比
71 torch.nn.AdaptiveAvgPool1d paddle.nn.AdaptiveAvgPool1D 功能一致,参数完全一致,差异对比
72 torch.nn.AdaptiveAvgPool2d paddle.nn.AdaptiveAvgPool2D 功能一致,仅 paddle 参数更多,差异对比
73 torch.nn.AdaptiveAvgPool3d paddle.nn.AdaptiveAvgPool3D 功能一致,仅 paddle 参数更多,差异对比
74 torch.nn.LogSigmoid paddle.nn.LogSigmoid 功能一致,无参数,差异对比
75 torch.nn.Sigmoid paddle.nn.Sigmoid 功能一致,无参数,差异对比
76 torch.nn.Softplus paddle.nn.Softplus 功能一致,参数完全一致,差异对比
77 torch.nn.Softsign paddle.nn.Softsign 功能一致,无参数,差异对比
78 torch.nn.Tanh paddle.nn.Tanh 功能一致,无参数,差异对比
79 torch.nn.Tanhshrink paddle.nn.Tanhshrink 功能一致,无参数,差异对比
80 torch.nn.TransformerDecoder paddle.nn.TransformerDecoder 功能一致,参数完全一致,差异对比
81 torch.nn.Identity paddle.nn.Identity 功能一致,参数完全一致,差异对比
82 torch.nn.TripletMarginWithDistanceLoss paddle.nn.TripletMarginWithDistanceLoss 功能一致,参数完全一致,差异对比
83 torch.nn.GroupNorm paddle.nn.GroupNorm 功能一致,torch 参数更多,差异对比
84 torch.nn.LayerNorm paddle.nn.LayerNorm 功能一致,torch 参数更多,差异对比
85 torch.nn.CTCLoss paddle.nn.CTCLoss 功能一致,torch 参数更多,差异对比
86 torch.nn.HingeEmbeddingLoss paddle.nn.HingeEmbeddingLoss 功能一致,torch 参数更多,差异对比
87 torch.nn.MarginRankingLoss paddle.nn.MarginRankingLoss 功能一致,torch 参数更多,差异对比
88 torch.nn.NLLLoss paddle.nn.NLLLoss 功能一致,torch 参数更多,差异对比
89 torch.nn.SoftMarginLoss paddle.nn.SoftMarginLoss 功能一致,torch 参数更多,差异对比
90 torch.nn.Mish paddle.nn.Mish 功能一致,torch 参数更多,差异对比
91 torch.nn.GLU 功能缺失
92 torch.nn.LazyBatchNorm1d 功能缺失
93 torch.nn.LazyBatchNorm2d 功能缺失
94 torch.nn.LazyBatchNorm3d 功能缺失
95 torch.nn.LazyInstanceNorm1d 功能缺失
96 torch.nn.LazyInstanceNorm2d 功能缺失
97 torch.nn.LazyInstanceNorm3d 功能缺失
98 torch.nn.AlphaDropout paddle.nn.AlphaDropout 功能一致,torch 参数更多,差异对比
99 torch.nn.Bilinear paddle.nn.Bilinear 功能一致,torch 参数更多,差异对比
100 torch.nn.CELU paddle.nn.CELU 功能一致,torch 参数更多,差异对比
101 torch.nn.CosineEmbeddingLoss paddle.nn.CosineEmbeddingLoss 功能一致,torch 参数更多,差异对比
102 torch.nn.GaussianNLLLoss paddle.nn.GaussianNLLLoss 功能一致,仅参数名不一致,差异对比
103 torch.nn.GELU paddle.nn.GELU 功能一致,参数不一致,差异对比
104 torch.nn.GRUCell paddle.nn.GRUCell 功能一致,参数不一致,差异对比
105 torch.nn.Hardswish paddle.nn.Hardswish 功能一致,torch 参数更多,差异对比
106 torch.nn.Hardtanh paddle.nn.Hardtanh 功能一致,torch 参数更多,差异对比
107 torch.nn.HuberLoss paddle.nn.SmoothL1Loss 功能一致,参数完全一致,差异对比
108 torch.nn.InstanceNorm1d paddle.nn.InstanceNorm1D 功能一致,参数不一致,差异对比
109 torch.nn.InstanceNorm2d paddle.nn.InstanceNorm2D 功能一致,参数不一致,差异对比
110 torch.nn.InstanceNorm3d paddle.nn.InstanceNorm3D 功能一致,torch 参数更多,差异对比
111 torch.nn.LSTMCell paddle.nn.LSTMCell 功能一致,参数不一致,差异对比
112 torch.nn.Unflatten paddle.nn.Unflatten 功能一致,仅参数名不一致,差异对比
113 torch.nn.MultiheadAttention paddle.nn.MultiHeadAttention 功能一致,torch 参数更多,差异对比
114 torch.nn.MultiLabelMarginLoss paddle.nn.MultiLabelSoftMarginLoss 功能一致,仅 paddle 参数更多,差异对比
115 torch.nn.MultiLabelSoftMarginLoss paddle.nn.MultiLabelSoftMarginLoss 功能一致,torch 参数更多,差异对比
116 torch.nn.MultiMarginLoss paddle.nn.MultiMarginLoss 功能一致,torch 参数更多,差异对比
117 torch.nn.parallel.DistributedDataParallel paddle.DataParallel 功能一致,torch 参数更多,差异对比
118 torch.nn.Parameter 组合替代实现,差异对比
119 torch.nn.PoissonNLLLoss paddle.nn.PoissonNLLLoss 功能一致,torch 参数更多,差异对比
120 torch.nn.ReLU6 paddle.nn.ReLU6 功能一致,torch 参数更多,差异对比
121 torch.nn.RNN paddle.nn.SimpleRNN 功能一致,参数不一致,差异对比
122 torch.nn.RNNBase paddle.nn.layer.rnn.RNNBase 功能一致,torch 参数更多,差异对比
123 torch.nn.RNNCell paddle.nn.SimpleRNNCell 功能一致,参数不一致,差异对比
124 torch.nn.RReLU paddle.nn.RReLU 功能一致,torch 参数更多,差异对比
125 torch.nn.SELU paddle.nn.SELU 功能一致,torch 参数更多,差异对比
126 torch.nn.Sequential paddle.nn.Sequential 功能一致,参数用法不一致,差异对比
127 torch.nn.SiLU paddle.nn.Silu 功能一致,torch 参数更多,差异对比
128 torch.nn.Softmax2d paddle.nn.Softmax 功能一致,仅 paddle 参数更多,差异对比
129 torch.nn.SyncBatchNorm.convert_sync_batchnorm paddle.nn.SyncBatchNorm.convert_sync_batchnorm(layer) 功能一致,torch 参数更多,差异对比
130 torch.nn.SyncBatchNorm paddle.nn.SyncBatchNorm 功能一致,参数不一致,差异对比
131 torch.nn.Threshold paddle.nn.ThresholdedReLU 功能一致,torch 参数更多,差异对比
132 torch.nn.Transformer paddle.nn.Transformer 功能一致,torch 参数更多,差异对比
133 torch.nn.TransformerDecoderLayer paddle.nn.TransformerDecoderLayer 功能一致,torch 参数更多,差异对比
134 torch.nn.TransformerEncoder paddle.nn.TransformerEncoder 功能一致,torch 参数更多,差异对比
135 torch.nn.TransformerEncoderLayer paddle.nn.TransformerEncoderLayer 功能一致,torch 参数更多,差异对比
136 torch.nn.TripletMarginLoss paddle.nn.TripletMarginLoss 功能一致,torch 参数更多,差异对比
137 torch.nn.parameter.Parameter paddle.create_parameter 功能一致,参数不一致,差异对比
138 torch.nn.MultiLabelMarginLoss 功能缺失
139 torch.nn.CTCLoss 功能缺失

持续更新...

torch.nn.functional.XX API 映射列表

梳理了torch.nn.functional.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.nn.functional.adaptive_avg_pool1d paddle.nn.functional.adaptive_avg_pool1d 功能一致,仅参数名不一致,差异对比
2 torch.nn.functional.adaptive_avg_pool2d paddle.nn.functional.adaptive_avg_pool2d 功能一致,仅参数名不一致,差异对比
3 torch.nn.functional.adaptive_avg_pool3d paddle.nn.functional.adaptive_avg_pool3d 功能一致,仅参数名不一致,差异对比
4 torch.nn.functional.adaptive_max_pool1d paddle.nn.functional.adaptive_max_pool1d 功能一致,仅参数名不一致,差异对比
5 torch.nn.functional.adaptive_max_pool2d paddle.nn.functional.adaptive_max_pool2d 功能一致,仅参数名不一致,差异对比
6 torch.nn.functional.adaptive_max_pool3d paddle.nn.functional.adaptive_max_pool3d 功能一致,仅参数名不一致,差异对比
7 torch.nn.functional.affine_grid paddle.nn.functional.affine_grid 功能一致,仅参数名不一致,差异对比
8 torch.nn.functional.bilinear paddle.nn.functional.bilinear 功能一致,参数不一致,差异对比
9 torch.nn.functional.conv1d paddle.nn.functional.conv1d 功能一致,仅参数名不一致,差异对比
10 torch.nn.functional.conv2d paddle.nn.functional.conv2d 功能一致,仅参数名不一致,差异对比
11 torch.nn.functional.conv3d paddle.nn.functional.conv3d 功能一致,仅参数名不一致,差异对比
12 torch.nn.functional.conv_transpose1d paddle.nn.functional.conv1d_transpose 功能一致,仅 paddle 参数更多,差异对比
13 torch.nn.functional.conv_transpose2d paddle.nn.functional.conv2d_transpose 功能一致,仅 paddle 参数更多,差异对比
14 torch.nn.functional.conv_transpose3d paddle.nn.functional.conv3d_transpose 功能一致,仅 paddle 参数更多,差异对比
15 torch.nn.functional.cosine_similarity paddle.nn.functional.cosine_similarity 功能一致,仅参数名不一致,差异对比
16 torch.nn.functional.cross_entropy paddle.nn.functional.cross_entropy 功能一致,torch 参数更多,差异对比
17 torch.nn.functional.elu_ paddle.nn.functional.elu_ 功能一致,仅参数名不一致,差异对比
18 torch.nn.functional.fold paddle.nn.functional.fold 功能一致,仅参数名不一致,差异对比
19 torch.nn.functional.glu paddle.nn.functional.glu 功能一致,仅参数名不一致,差异对比
20 torch.nn.functional.grid_sample paddle.nn.functional.grid_sample 功能一致,仅参数名不一致,差异对比
21 torch.nn.functional.hardshrink paddle.nn.functional.hardshrink 功能一致,仅参数名不一致,差异对比
22 torch.nn.functional.linear paddle.nn.functional.linear 功能一致,参数不一致,差异对比
23 torch.nn.functional.local_response_norm paddle.nn.functional.local_response_norm 功能一致,仅参数名不一致,差异对比
24 torch.nn.functional.logsigmoid paddle.nn.functional.log_sigmoid 功能一致,仅参数名不一致,差异对比
25 torch.nn.functional.margin_ranking_loss paddle.nn.functional.margin_ranking_loss 功能一致,torch 参数更多,差异对比
26 torch.nn.functional.max_unpool1d paddle.nn.functional.max_unpool1d 功能一致,参数不一致,差异对比
27 torch.nn.functional.max_unpool2d paddle.nn.functional.max_unpool2d 功能一致,参数不一致,差异对比
28 torch.nn.functional.max_unpool3d paddle.nn.functional.max_unpool3d 功能一致,参数不一致,差异对比
29 torch.nn.functional.mse_loss paddle.nn.functional.mse_loss 功能一致,torch 参数更多,差异对比
30 torch.nn.functional.nll_loss paddle.nn.functional.nll_loss 功能一致,torch 参数更多,差异对比
31 torch.nn.functional.normalize paddle.nn.functional.normalize 功能一致,torch 参数更多,差异对比
32 torch.nn.functional.one_hot paddle.nn.functional.one_hot 功能一致,参数不一致,差异对比
33 torch.nn.functional.pad paddle.nn.functional.pad 功能一致,仅 paddle 参数更多,差异对比
34 torch.nn.functional.pixel_shuffle paddle.nn.functional.pixel_shuffle 功能一致,仅 paddle 参数更多,差异对比
35 torch.nn.functional.pixel_unshuffle paddle.nn.functional.pixel_unshuffle 功能一致,仅 paddle 参数更多,差异对比
36 torch.nn.functional.prelu paddle.nn.functional.prelu 功能一致,仅 paddle 参数更多,差异对比
37 torch.nn.functional.relu6 paddle.nn.functional.relu6 功能一致,仅参数名不一致,差异对比
38 torch.nn.functional.relu_ paddle.nn.functional.relu_ 功能一致,仅参数名不一致,差异对比
39 torch.nn.functional.sigmoid paddle.nn.functional.sigmoid 功能一致,仅参数名不一致,差异对比
40 torch.nn.functional.smooth_l1_loss paddle.nn.functional.smooth_l1_loss 功能一致,参数不一致,差异对比
41 torch.nn.functional.softmax paddle.nn.functional.softmax 功能一致,torch 参数更多,差异对比
42 torch.nn.functional.softplus paddle.nn.functional.softplus 功能一致,仅参数名不一致,差异对比
43 torch.nn.functional.softshrink paddle.nn.functional.softshrink 功能一致,仅参数名不一致,差异对比
44 torch.nn.functional.softsign paddle.nn.functional.softsign 功能一致,仅参数名不一致,差异对比
45 torch.nn.functional.soft_margin_loss paddle.nn.functional.soft_margin_loss 功能一致,torch 参数更多,差异对比
46 torch.nn.functional.tanhshrink paddle.nn.functional.tanhshrink 功能一致,仅参数名不一致,差异对比
47 torch.nn.functional.triplet_margin_loss paddle.nn.functional.triplet_margin_loss 功能一致,torch 参数更多,差异对比
48 torch.nn.functional.triplet_margin_with_distance_loss paddle.nn.functional.triplet_margin_with_distance_loss 功能一致,仅参数名不一致,差异对比
49 torch.nn.functional.upsample paddle.nn.functional.upsample 功能一致,仅 paddle 参数更多,差异对比
50 torch.nn.functional.max_pool2d paddle.nn.functional.max_pool2d 功能一致,torch 参数更多,差异对比
51 torch.nn.functional.binary_cross_entropy_with_logits paddle.nn.functional.binary_cross_entropy_with_logits 功能一致,torch 参数更多,差异对比
52 torch.nn.functional.l1_loss paddle.nn.functional.l1_loss 功能一致,torch 参数更多,差异对比
53 torch.nn.functional.mish paddle.nn.functional.mish 功能一致,torch 参数更多,差异对比
54 torch.nn.functional.group_norm 功能缺失
55 torch.nn.functional.avg_pool1d paddle.nn.functional.avg_pool1d 功能一致,参数不一致,差异对比
56 torch.nn.functional.avg_pool2d paddle.nn.functional.avg_pool2d 功能一致,参数不一致,差异对比
57 torch.nn.functional.avg_pool3d paddle.nn.functional.avg_pool3d 功能一致,参数不一致,差异对比
58 torch.nn.functional.batch_norm paddle.nn.functional.batch_norm 功能一致,参数不一致,差异对比
59 torch.nn.functional.celu paddle.nn.functional.celu 功能一致,torch 参数更多,差异对比
60 torch.nn.functional.cosine_embedding_loss paddle.nn.functional.cosine_embedding_loss 功能一致,torch 参数更多,差异对比
61 torch.nn.functional.ctc_loss paddle.nn.functional.ctc_loss 功能一致,torch 参数更多,差异对比
62 torch.nn.functional.elu paddle.nn.functional.elu 功能一致,torch 参数更多,差异对比
63 torch.nn.functional.gaussian_nll_loss paddle.nn.functional.gaussian_nll_loss 功能一致,仅参数名不一致,差异对比
64 torch.nn.functional.gelu paddle.nn.functional.gelu 功能一致,参数不一致,差异对比
65 torch.nn.functional.gumbel_softmax paddle.nn.functional.gumbel_softmax 功能一致,torch 参数更多,差异对比
66 torch.nn.functional.hardswish paddle.nn.functional.hardswish 功能一致,torch 参数更多,差异对比
67 torch.nn.functional.hardtanh paddle.nn.functional.hardtanh 功能一致,torch 参数更多,差异对比
68 torch.nn.functional.hinge_embedding_loss paddle.nn.functional.hinge_embedding_loss 功能一致,torch 参数更多,差异对比
69 torch.nn.functional.huber_loss paddle.nn.functional.smooth_l1_loss 功能一致,仅参数名不一致,差异对比
70 torch.nn.functional.instance_norm paddle.nn.functional.instance_norm 功能一致,参数不一致,差异对比
71 torch.nn.functional.interpolate paddle.nn.functional.interpolate 功能一致,torch 参数更多,差异对比
72 torch.nn.functional.kl_div paddle.nn.functional.kl_div 功能一致,torch 参数更多,差异对比
73 torch.nn.functional.layer_norm paddle.nn.functional.layer_norm 功能一致,仅参数名不一致,差异对比
74 torch.nn.functional.leaky_relu paddle.nn.functional.leaky_relu 功能一致,torch 参数更多,差异对比
75 torch.nn.functional.upsample_nearest paddle.nn.functional.upsample 功能一致,仅 paddle 参数更多,差异对比
76 torch.nn.functional.log_softmax paddle.nn.functional.log_softmax 功能一致,torch 参数更多,差异对比
77 torch.nn.functional.max_pool1d paddle.nn.functional.max_pool1d 功能一致,torch 参数更多,差异对比
78 torch.nn.functional.max_pool2d paddle.nn.functional.max_pool2d 功能一致,torch 参数更多,差异对比
79 torch.nn.functional.max_pool3d paddle.nn.functional.max_pool3d 功能一致,torch 参数更多,差异对比
80 torch.nn.functional.relu paddle.nn.functional.relu 功能一致,torch 参数更多,差异对比
81 torch.nn.functional.rrelu paddle.nn.functional.rrelu 功能一致,torch 参数更多,差异对比
82 torch.nn.functional.selu paddle.nn.functional.selu 功能一致,torch 参数更多,差异对比
83 torch.nn.functional.softmin 组合替代实现,差异对比
84 torch.nn.functional.threshold paddle.nn.functional.thresholded_relu 功能一致,torch 参数更多,差异对比
85 torch.nn.functional.unfold paddle.nn.functional.unfold 功能一致,仅参数名不一致,差异对比
86 torch.nn.functional.upsample_bilinear paddle.nn.functional.upsample 功能一致,仅 paddle 参数更多,差异对比
87 torch.nn.functional.multilabel_margin_loss 功能缺失
88 torch.nn.functional.ctc_loss 功能缺失

持续更新...

torch.Tensor.XX API 映射列表

梳理了torch.Tensor.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.Tensor.device paddle.Tensor.place 功能一致,无参数,差异对比
2 torch.Tensor.grad paddle.Tensor.grad 功能一致,无参数,差异对比
3 torch.Tensor.imag paddle.Tensor.imag 功能一致,无参数,差异对比
4 torch.Tensor.is_leaf paddle.Tensor.is_leaf 功能一致,无参数,差异对比
5 torch.Tensor.is_sparse paddle.Tensor.is_sparse 功能一致,无参数,差异对比
6 torch.Tensor.ndim paddle.Tensor.ndim 功能一致,无参数,差异对比
7 torch.Tensor.real paddle.Tensor.real 功能一致,无参数,差异对比
8 torch.Tensor.shape paddle.Tensor.shape 功能一致,无参数,差异对比
9 torch.Tensor.T paddle.Tensor.T 功能一致,无参数,差异对比
10 torch.Tensor.is_contiguous 无对应 API,可以直接删除,对网络一般无影响
11 torch.Tensor.contiguous 无对应 API,可以直接删除,对网络一般无影响
12 torch.Tensor.float paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
13 torch.Tensor.int paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
14 torch.Tensor.sigmoid paddle.Tensor.sigmoid 功能一致,无参数,差异对比
15 torch.Tensor.copy_ paddle.assign 功能一致,torch 参数更多,差异对比
16 torch.Tensor.masked_fill paddle.Tensor.masked_fill 功能一致,参数完全一致,差异对比
17 torch.Tensor.fill_ paddle.Tensor.fill\_ 功能一致,参数完全一致,差异对比
18 torch.Tensor.unique paddle.Tensor.unique 功能一致,torch 参数更多,差异对比
19 torch.Tensor.expand paddle.Tensor.expand 功能一致,仅参数名不一致,差异对比
20 torch.Tensor.requires_grad_ paddle.Tensor.stop_gradient 组合替代实现,差异对比
21 torch.Tensor.cuda paddle.Tensor.cuda 功能一致,torch 参数更多,差异对比
22 torch.Tensor.softmax paddle.nn.functional.softmax 功能一致,仅 paddle 参数更多,差异对比
23 torch.Tensor.count_nonzero paddle.Tensor.count_nonzero 功能一致,仅 paddle 参数更多,差异对比
24 torch.Tensor.acosh paddle.Tensor.acosh 功能一致,无参数,差异对比
25 torch.Tensor.chunk paddle.Tensor.chunk 功能一致,仅参数名不一致,差异对比
26 torch.Tensor.clamp paddle.Tensor.clip 功能一致,参数完全一致,差异对比
27 torch.Tensor.clamp_ paddle.Tensor.clip_ 功能一致,参数完全一致,差异对比
28 torch.Tensor.clip paddle.Tensor.clip 功能一致,参数完全一致,差异对比
29 torch.Tensor.clip_ paddle.Tensor.clip_ 功能一致,参数完全一致,差异对比
30 torch.Tensor.conj paddle.Tensor.conj 功能一致,无参数,差异对比
31 torch.Tensor.cos paddle.Tensor.cos 功能一致,无参数,差异对比
32 torch.Tensor.cosh paddle.Tensor.cosh 功能一致,无参数,差异对比
33 torch.Tensor.var paddle.Tensor.var 功能一致,仅参数名不一致,差异对比
34 torch.Tensor.where paddle.Tensor.where 功能一致,参数不一致,差异对比
35 torch.Tensor.zero_ paddle.Tensor.zero_ 功能一致,无参数,差异对比
36 torch.Tensor.arctanh paddle.Tensor.atanh 功能一致,无参数,差异对比
37 torch.Tensor.atanh paddle.Tensor.atanh 功能一致,无参数,差异对比
38 torch.Tensor.take paddle.Tensor.take 功能一致,仅 paddle 参数更多,差异对比
39 torch.Tensor.tan paddle.Tensor.tan 功能一致,无参数,差异对比
40 torch.Tensor.tanh paddle.Tensor.tanh 功能一致,无参数,差异对比
41 torch.Tensor.tanh_ paddle.Tensor.tanh_ 功能一致,无参数,差异对比
42 torch.Tensor.tile paddle.Tensor.tile 功能一致,参数不一致,差异对比
43 torch.Tensor.to_sparse paddle.Tensor.to_sparse_coo 功能一致,参数完全一致,差异对比
44 torch.Tensor.tolist paddle.Tensor.tolist 功能一致,无参数,差异对比
45 torch.Tensor.topk paddle.Tensor.topk 功能一致,仅参数名不一致,差异对比
46 torch.Tensor.arccosh paddle.Tensor.acosh 功能一致,无参数,差异对比
47 torch.Tensor.cpu paddle.Tensor.cpu 功能一致,torch 参数更多,差异对比
48 torch.Tensor.cross paddle.Tensor.cross 功能一致,仅参数名不一致,差异对比
49 torch.Tensor.cumprod paddle.Tensor.cumprod 功能一致,参数完全一致,差异对比
50 torch.Tensor.cumsum paddle.Tensor.cumsum 功能一致,仅参数名不一致,差异对比
51 torch.Tensor.deg2rad paddle.Tensor.deg2rad 功能一致,无参数,差异对比
52 torch.Tensor.det paddle.linalg.det 功能一致,无参数,差异对比
53 torch.Tensor.detach paddle.Tensor.detach 功能一致,无参数,差异对比
54 torch.Tensor.diag paddle.Tensor.diag 功能一致,仅参数名不一致,差异对比
55 torch.Tensor.diagonal paddle.Tensor.diagonal 功能一致,仅参数名不一致,差异对比
56 torch.Tensor.diff paddle.Tensor.diff 功能一致,仅参数名不一致,差异对比
57 torch.Tensor.digamma paddle.Tensor.digamma 功能一致,无参数,差异对比
58 torch.Tensor.dim paddle.Tensor.dim 功能一致,无参数,差异对比
59 torch.Tensor.dist paddle.Tensor.dist 功能一致,仅参数名不一致,差异对比
60 torch.Tensor.dot paddle.Tensor.dot 功能一致,仅参数名不一致,差异对比
61 torch.Tensor.element_size paddle.Tensor.element_size 功能一致,无参数,差异对比
62 torch.Tensor.eq paddle.Tensor.equal 功能一致,仅参数名不一致,差异对比
63 torch.Tensor.equal paddle.Tensor.equal_all 功能一致,仅参数名不一致,差异对比
64 torch.Tensor.erf paddle.Tensor.erf 功能一致,无参数,差异对比
65 torch.Tensor.erfinv paddle.Tensor.erfinv 功能一致,无参数,差异对比
66 torch.Tensor.xlogy 组合替代实现,差异对比
67 torch.Tensor.exp paddle.Tensor.exp 功能一致,无参数,差异对比
68 torch.Tensor.exp_ paddle.Tensor.exp\_ 功能一致,无参数,差异对比
69 torch.Tensor.expand_as paddle.Tensor.expand_as 功能一致,仅参数名不一致,差异对比
70 torch.Tensor.fill_ paddle.Tensor.fill\_ 功能一致,参数完全一致,差异对比
71 torch.Tensor.fill_diagonal_ paddle.Tensor.fill_diagonal_ 功能一致,仅 paddle 参数更多,差异对比
72 torch.Tensor.fix paddle.Tensor.trunc 功能一致,无参数,差异对比
73 torch.Tensor.flatten paddle.Tensor.flatten 功能一致,仅参数名不一致,差异对比
74 torch.Tensor.flip paddle.Tensor.flip 功能一致,仅参数名不一致,差异对比
75 torch.Tensor.fliplr paddle.Tensor.flip 功能一致,仅 paddle 参数更多,差异对比
76 torch.Tensor.flipud paddle.Tensor.flip 功能一致,仅 paddle 参数更多,差异对比
77 torch.Tensor.floor paddle.Tensor.floor 功能一致,无参数,差异对比
78 torch.Tensor.floor_ paddle.Tensor.floor\_ 功能一致,无参数,差异对比
79 torch.Tensor.floor_divide paddle.Tesnor.floor_divide 功能一致,参数不一致,差异对比
80 torch.Tensor.fmax paddle.Tensor.fmax 功能一致,仅参数名不一致,差异对比
81 torch.Tensor.fmin paddle.Tensor.fmin 功能一致,仅参数名不一致,差异对比
82 torch.Tensor.frac paddle.Tensor.frac 功能一致,无参数,差异对比
83 torch.Tensor.gather paddle.Tensor.take_along_axis 功能一致,仅参数名不一致,差异对比
84 torch.Tensor.logcumsumexp paddle.Tensor.logcumsumexp 功能一致,仅 paddle 参数更多,差异对比
85 torch.Tensor.diagflat paddle.diagflat 功能一致,参数完全一致,差异对比
86 torch.Tensor.nanquantile paddle.Tensor.nanquantile 功能一致,torch 参数更多,差异对比
87 torch.Tensor.negative paddle.Tensor.neg 功能一致,无参数,差异对比
88 torch.Tensor.nelement paddle.Tensor.size 功能一致,无参数,差异对比
89 torch.Tensor.nonzero paddle.Tensor.nonzero 功能一致,无参数,差异对比
90 torch.Tensor.numel paddle.Tensor.size 功能一致,无参数,差异对比
91 torch.Tensor.numpy paddle.Tensor.numpy 功能一致,torch 参数更多,差异对比
92 torch.Tensor.outer paddle.outer 功能一致,仅参数名不一致,差异对比
93 torch.Tensor.pin_memory paddle.Tensor.pin_memory 功能一致,无参数,差异对比
94 torch.Tensor.pow paddle.pow 功能一致,仅参数名不一致,差异对比
95 torch.Tensor.prod paddle.Tensor.prod 功能一致,仅参数名不一致,差异对比
96 torch.Tensor.arcsinh paddle.Tensor.asinh 功能一致,无参数,差异对比
97 torch.Tensor.asinh paddle.Tensor.asinh 功能一致,无参数,差异对比
98 torch.Tensor.rsqrt paddle.Tensor.rsqrt 功能一致,无参数,差异对比
99 torch.Tensor.rsqrt_ paddle.Tensor.rsqrt_ 功能一致,无参数,差异对比
100 torch.Tensor.select 组合替代实现,差异对比
101 torch.Tensor.sigmoid paddle.Tensor.sigmoid 功能一致,无参数,差异对比
102 torch.Tensor.sign paddle.Tensor.sign 功能一致,无参数,差异对比
103 torch.Tensor.sin paddle.Tensor.sin 功能一致,无参数,差异对比
104 torch.Tensor.sinh paddle.Tensor.sinh 功能一致,无参数,差异对比
105 torch.Tensor.slogdet paddle.linalg.slogdet 功能一致,返回参数类型不一致,差异对比
106 torch.Tensor.mul paddle.Tensor.multiply 功能一致,参数不一致,差异对比
107 torch.Tensor.mul_ 功能缺失
108 torch.Tensor.multiply paddle.Tensor.multiply 功能一致,参数不一致,差异对比
109 torch.Tensor.multiply_ 功能缺失
110 torch.Tensor.mv paddle.Tensor.mv 功能一致,参数完全一致,差异对比
111 torch.Tensor.nansum paddle.Tensor.nansum 功能一致,仅参数名不一致,差异对比
112 torch.Tensor.ndimension paddle.Tensor.ndimension 功能一致,无参数,差异对比
113 torch.Tensor.ne paddle.Tensor.not_equal 功能一致,参数不一致,差异对比
114 torch.Tensor.neg paddle.Tensor.neg 功能一致,无参数,差异对比
115 torch.Tensor.not_equal paddle.Tensor.not_equal 功能一致,参数不一致,差异对比
116 torch.Tensor.gcd paddle.Tensor.gcd 功能一致,仅参数名不一致,差异对比
117 torch.Tensor.ge paddle.Tensor.greater_equal 功能一致,参数不一致,差异对比
118 torch.Tensor.ger paddle.Tensor.outer 功能一致,仅参数名不一致,差异对比
119 torch.Tensor.get_device paddle.device.get_device 功能一致,无参数,差异对比
120 torch.Tensor.greater paddle.Tensor.greater_than 功能一致,参数不一致,差异对比
121 torch.Tensor.greater_equal paddle.Tensor.greater_equal 功能一致,参数不一致,差异对比
122 torch.Tensor.gt paddle.Tensor.greater_than 功能一致,参数不一致,差异对比
123 torch.Tensor.hardshrink paddle.nn.functional.hardshrink 功能一致,仅参数名不一致,差异对比
124 torch.Tensor.heaviside paddle.Tensor.heaviside 功能一致,仅参数名不一致,差异对比
125 torch.Tensor.histc paddle.Tensor.histogram 功能一致,参数不一致,差异对比
126 torch.Tensor.lgamma paddle.Tensor.lgamma 功能一致,无参数,差异对比
127 torch.Tensor.log paddle.Tensor.log 功能一致,无参数,差异对比
128 torch.Tensor.log10 paddle.Tensor.log10 功能一致,无参数,差异对比
129 torch.Tensor.log1p paddle.Tensor.log1p 功能一致,无参数,差异对比
130 torch.Tensor.log2 paddle.Tensor.log2 功能一致,无参数,差异对比
131 torch.Tensor.logdet 组合替代实现,差异对比
132 torch.Tensor.logical_and paddle.Tensor.logical_and 功能一致,仅 paddle 参数更多,差异对比
133 torch.Tensor.logical_not paddle.Tensor.logical_not 功能一致,仅 paddle 参数更多,差异对比
134 torch.Tensor.logical_or paddle.Tensor.logical_or 功能一致,仅 paddle 参数更多,差异对比
135 torch.Tensor.logsumexp paddle.Tensor.logsumexp 功能一致,仅参数名不一致,差异对比
136 torch.Tensor.trace paddle.Tensor.trace 功能一致,仅 paddle 参数更多,差异对比
137 torch.Tensor.tril paddle.tril 功能一致,参数完全一致,差异对比
138 torch.Tensor.triu paddle.triu 功能一致,参数完全一致,差异对比
139 torch.Tensor.true_divide paddle.Tensor.divide 功能一致,仅参数名不一致,差异对比
140 torch.Tensor.trunc paddle.Tensor.trunc 功能一致,无参数,差异对比
141 torch.Tensor.unbind paddle.Tensor.unbind 功能一致,仅参数名不一致,差异对比
142 torch.Tensor.uniform_ paddle.Tensor.uniform 功能一致,仅 paddle 参数更多,差异对比
143 torch.Tensor.unique_consecutive paddle.Tensor.unique_consecutive 功能一致,仅 paddle 参数更多,差异对比
144 torch.Tensor.unsqueeze paddle.Tensor.unsqueeze 功能一致,仅参数名不一致,差异对比
145 torch.Tensor.unsqueeze_ paddle.Tensor.unsqueeze_ 功能一致,仅参数名不一致,差异对比
146 torch.Tensor.take_along_dim paddle.Tensor.take_along_axis 功能一致,仅参数名不一致,差异对比
147 torch.Tensor.bernoulli paddle.bernoulli 功能一致,torch 参数更多,差异对比
148 torch.Tensor.bfloat16 paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
149 torch.Tensor.bool paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
150 torch.Tensor.byte paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
151 torch.Tensor.char paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
152 torch.Tensor.clone paddle.Tensor.clone 功能一致,torch 参数更多,差异对比
153 torch.Tensor.copy_ paddle.assign 功能一致,torch 参数更多,差异对比
154 torch.Tensor.div paddle.Tensor.divide 功能一致,torch 参数更多,差异对比
155 torch.Tensor.divide paddle.Tensor.divide 功能一致,torch 参数更多,差异对比
156 torch.Tensor.double paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
157 torch.Tensor.arctan2 paddle.atan2 功能一致,仅参数名不一致,差异对比
158 torch.Tensor.cdouble paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
159 torch.Tensor.cfloat paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
160 torch.Tensor.nanmean paddle.Tensor.nanmean 功能一致,torch 参数更多,差异对比
161 torch.Tensor.fmod paddle.Tensor.mod 功能一致,参数不一致,差异对比
162 torch.Tensor.le paddle.Tensor.less_equal 功能一致,参数不一致,差异对比
163 torch.Tensor.less_equal paddle.Tensor.less_equal 功能一致,参数不一致,差异对比
164 torch.Tensor.lt paddle.Tensor.less_than 功能一致,参数不一致,差异对比
165 torch.Tensor.less paddle.Tensor.less_than 功能一致,参数不一致,差异对比
166 torch.Tensor.all paddle.Tensor.all 功能一致,参数不一致,差异对比
167 torch.Tensor.any paddle.Tensor.any 功能一致,参数不一致,差异对比
168 torch.Tensor.diagonal_scatter paddle.Tensor.diagonal_scatter 功能一致,仅参数名不一致,差异对比
169 torch.Tensor.bitwise_right_shift 功能缺失
170 torch.Tensor.is_conj 功能缺失
171 torch.Tensor.scatter_reduce 功能缺失
172 torch.Tensor.select_scatter 功能缺失
173 torch.Tensor.slice_scatter 功能缺失
174 torch.Tensor.hsplit paddle.Tensor.hsplit 功能一致,仅参数名不一致,差异对比
175 torch.Tensor.vsplit paddle.Tensor.vsplit 功能一致,仅参数名不一致,差异对比
176 torch.Tensor.dsplit paddle.Tensor.dsplit 功能一致,仅参数名不一致,差异对比
177 torch.Tensor.tensor_split paddle.Tensor.tensor_split 功能一致,仅参数名不一致,差异对比
178 torch.Tensor.is_coalesced 功能缺失
179 torch.Tensor.histogram 功能缺失
180 torch.Tensor.geqrf 功能缺失
181 torch.Tensor.sparse_resize_ 功能缺失
182 torch.Tensor.sparse_resize_and_clear_ 功能缺失
183 torch.Tensor.bitwise_left_shift 功能缺失
184 torch.Tensor.resolve_conj 功能缺失
185 torch.Tensor.resolve_neg 功能缺失
186 torch.Tensor.abs paddle.Tensor.abs 功能一致,无参数,差异对比
187 torch.Tensor.absolute paddle.Tensor.abs 功能一致,无参数,差异对比
188 torch.Tensor.add paddle.Tensor.add 功能一致,torch 参数更多,差异对比
189 torch.Tensor.addbmm 组合替代实现,差异对比
190 torch.Tensor.addcdiv 组合替代实现,差异对比
191 torch.Tensor.addcmul 组合替代实现,差异对比
192 torch.Tensor.addmv 组合替代实现,差异对比
193 torch.Tensor.addr 组合替代实现,差异对比
194 torch.Tensor.add_ paddle.Tensor.add\_ 功能一致,torch 参数更多,差异对比
195 torch.Tensor.adjoint 组合替代实现,差异对比
196 torch.Tensor.aminmax 组合替代实现,差异对比
197 torch.Tensor.argwhere paddle.Tensor.nonzero 功能一致,仅 paddle 参数更多,差异对比
198 torch.Tensor.backward paddle.Tensor.backward 功能一致,torch 参数更多,差异对比
199 torch.Tensor.baddbmm 组合替代实现,差异对比
200 torch.Tensor.bernoulli_ 组合替代实现,差异对比
201 torch.Tensor.cholesky_inverse 组合替代实现,差异对比
202 torch.Tensor.dtype paddle.Tensor.dtype 功能一致,无参数,差异对比
203 torch.Tensor.coalesce paddle.sparse.coalesce 功能一致,无参数,差异对比
204 torch.Tensor.conj_physical paddle.Tensor.conj 功能一致,无参数,差异对比
205 torch.Tensor.corrcoef paddle.Tensor.corrcoef 功能一致,仅 paddle 参数更多,差异对比
206 torch.Tenor.cov paddle.linalg.cov 功能一致,仅 paddle 参数更多,差异对比
207 torch.Tensor.erfinv_ paddle.erfinv\_ 功能一致,无参数,差异对比
208 torch.Tensor.expm1 paddle.expm1 功能一致,无参数,差异对比
209 torch.Tensor.exponential_ paddle.Tensor.exponential\_ 功能一致,torch 参数更多,差异对比
210 torch.Tensor.exp_ paddle.Tensor.exp\_ 功能一致,无参数,差异对比
211 torch.Tensor.vdot paddle.Tensor.dot 功能一致,仅参数名不一致,差异对比
212 torch.Tensor.frexp paddle.Tensor.frexp 功能一致,无参数,差异对比
213 torch.Tensor.H 组合替代实现,差异对比
214 torch.Tensor.half paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
215 torch.Tensor.hypot paddle.Tensor.hypot 功能一致,仅参数名不一致,差异对比
216 torch.Tensor.index_add paddle.index_add 功能一致,torch 参数更多,差异对比
217 torch.Tensor.index_add_ paddle.Tensor.index_add_ 功能一致,torch 参数更多,差异对比
218 torch.Tensor.values paddle.Tensor.values 功能一致,无参数,差异对比
219 torch.Tensor.istft paddle.signal.istft 功能一致,参数完全一致,差异对比
220 torch.Tensor.is_cuda 组合替代实现,差异对比
221 torch.Tensor.is_signed 组合替代实现,差异对比
222 torch.Tensor.item paddle.Tensor.item 功能一致,仅 paddle 参数更多,差异对比
223 torch.Tensor.ldexp 组合替代实现,差异对比
224 torch.Tensor.logaddexp 组合替代实现,差异对比
225 torch.Tensor.logaddexp2 组合替代实现,差异对比
226 torch.Tensor.long paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
227 torch.Tensor.lstsq paddle.Tensor.lstsq 功能一致,参数不一致,差异对比
228 torch.Tensor.maximum paddle.Tensor.maximum 功能一致,仅参数名不一致,差异对比
229 torch.Tensor.mH 组合替代实现,差异对比
230 torch.Tensor.minimum paddle.Tensor.minimum 功能一致,仅参数名不一致,差异对比
231 torch.Tensor.mm paddle.Tensor.mm 功能一致,参数完全一致,差异对比
232 torch.Tensor.moveaxis paddle.Tensor.moveaxis 功能一致,参数完全一致,差异对比
233 torch.Tensor.movedim paddle.Tensor.moveaxis 功能一致,参数完全一致,差异对比
234 torch.Tensor.msort 组合替代实现,差异对比
235 torch.Tensor.mT 组合替代实现,差异对比
236 torch.Tensor.multinomial paddle.multinomial 功能一致,torch 参数更多,差异对比
237 torch.Tensor.nan_to_num paddle.Tensor.nan_to_num 功能一致,参数完全一致,差异对比
238 torch.Tensor.narrow paddle.slice 功能一致,参数不一致,差异对比
239 torch.Tensor.narrow_copy 组合替代实现,差异对比
240 torch.Tensor.nextafter paddle.Tensor.nextafter 功能一致,仅参数名不一致,差异对比
241 torch.Tensor.norm paddle.Tensor.norm 功能一致,torch 参数更多,差异对比
242 torch.Tensor.normal_ 组合替代实现,差异对比
243 torch.Tensor.permute paddle.Tensor.transpose 功能一致,参数不一致,差异对比
244 torch.Tensor.pinverse paddle.linalg.pinv 功能一致,仅 paddle 参数更多,差异对比
245 torch.Tensor.quantile paddle.Tensor.quantile 功能一致,torch 参数更多,差异对比
246 torch.Tensor.rad2deg paddle.Tensor.rad2deg 功能一致,无参数,差异对比
247 torch.Tensor.ravel paddle.Tensor.flatten 功能一致,仅 paddle 参数更多,差异对比
248 torch.Tensor.reciprocal paddle.reciprocal 功能一致,无参数,差异对比
249 torch.Tensor.reciprocal_ paddle.Tensor.reciprocal_ 功能一致,无参数,差异对比
250 torch.Tensor.register_hook paddle.Tensor.register_hook 功能一致,参数完全一致,差异对比
251 torch.Tensor.remainder paddle.remainder 功能一致,参数不一致,差异对比
252 torch.Tensor.remainder_ paddle.remainder_ 功能一致,参数不一致,差异对比
253 torch.Tensor.renorm paddle.renorm 功能一致,仅参数名不一致,差异对比
254 torch.Tensor.repeat paddle.Tensor.tile 功能一致,参数不一致,差异对比
255 torch.Tensor.repeat_interleave paddle.Tensor.repeat_interleave 功能一致,torch 参数更多,差异对比
256 torch.Tensor.reshape paddle.Tensor.reshape 功能一致,参数不一致,差异对比
257 torch.Tensor.reshape_as 组合替代实现,差异对比
258 torch.Tensor.retain_grad paddle.Tensor.retain_grads 功能一致,无参数,差异对比
259 torch.Tensor.roll paddle.Tensor.roll 功能一致,仅参数名不一致,差异对比
260 torch.Tensor.rot90 paddle.rot90 功能一致,仅参数名不一致,差异对比
261 torch.Tensor.round paddle.Tensor.round 功能一致,torch 参数更多,差异对比
262 torch.Tensor.round_ paddle.Tensor.round_ 功能一致,torch 参数更多,差异对比
263 torch.Tensor.rsqrt paddle.Tensor.rsqrt 功能一致,无参数,差异对比
264 torch.Tensor.scatter paddle.Tensor.put_along_axis 功能一致,仅 paddle 参数更多,差异对比
265 torch.Tensor.scatter_ paddle.Tensor.put_along_axis_ 功能一致,仅参数名不一致,差异对比
266 torch.Tensor.scatter_add paddle.Tensor.put_along_axis 功能一致,仅 paddle 参数更多,差异对比
267 torch.Tensor.scatter_add_ paddle.Tensor.put_along_axis_ 功能一致,仅 paddle 参数更多,差异对比
268 torch.Tensor.sgn paddle.Tensor.sgn 功能一致,无参数,差异对比
269 torch.Tensor.short paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
270 torch.Tensor.sinc 组合替代实现,差异对比
271 torch.Tensor.size paddle.Tensor.shape 功能一致,torch 参数更多,差异对比
272 torch.Tensor.sort paddle.sort 功能一致,仅参数名不一致,差异对比
273 torch.Tensor.split paddle.Tensor.split 功能一致,参数不一致,差异对比
274 torch.Tensor.sqrt paddle.Tensor.sqrt 功能一致,无参数,差异对比
275 torch.Tensor.sqrt_ paddle.Tensor.sqrt_ 功能一致,无参数,差异对比
276 torch.Tensor.square paddle.Tensor.square 功能一致,无参数,差异对比
277 torch.Tensor.squeeze paddle.Tensor.squeeze_ 功能一致,仅参数名不一致,差异对比
278 torch.Tensor.squeeze_ paddle.Tensor.squeeze_ 功能一致,仅参数名不一致,差异对比
279 torch.Tensor.std paddle.Tensor.std 功能一致,仅参数名不一致,差异对比
280 torch.Tensor.stft paddle.signal.stft 功能一致,torch 参数更多,差异对比
281 torch.Tensor.sub paddle.Tensor.subtract 功能一致,torch 参数更多,差异对比
282 torch.Tensor.subtract paddle.Tensor.subtract 功能一致,torch 参数更多,差异对比
283 torch.Tensor.subtract_ paddle.Tensor.subtract_ 功能一致,torch 参数更多,差异对比
284 torch.Tensor.sum paddle.Tensor.sum 功能一致,仅参数名不一致,差异对比
285 torch.Tensor.svd paddle.linalg.svd 功能一致,参数不一致,差异对比
286 torch.Tensor.swapaxes paddle.transpose 功能一致,参数不一致,差异对比
287 torch.Tensor.swapdims paddle.transpose 功能一致,参数不一致,差异对比
288 torch.Tensor.symeig paddle.linalg.eigh 功能一致,torch 参数更多,差异对比
289 torch.Tensor.t paddle.Tensor.t 功能一致,无参数,差异对比
290 torch.Tensor.to paddle.Tensor.to 功能一致,torch 参数更多,差异对比
291 torch.Tensor.to_dense paddle.Tensor.to_dense 功能一致,无参数,差异对比
292 torch.Tensor.transpose paddle.Tensor.transpose 功能一致,参数不一致,差异对比
293 torch.Tensor.triangular_solve paddle.Tensor.triangular_solve 功能一致,参数不一致,差异对比
294 torch.Tensor.type paddle.Tensor.astype 功能一致,torch 参数更多,差异对比
295 torch.Tensor.type_as paddle.Tensor.astype 组合替代实现,差异对比
296 torch.Tensor.T paddle.Tensor.T 功能一致,无参数,差异对比
297 torch.Tensor.unflatten paddle.reshape 功能一致,参数不一致,差异对比
298 torch.ByteTensor paddle.to_tensor 功能一致,仅 paddle 参数更多,差异对比
299 torch.DoubleTensor paddle.to_tensor 功能一致,仅 paddle 参数更多,差异对比
300 torch.HalfTensor paddle.to_tensor 功能一致,仅 paddle 参数更多,差异对比
301 torch.ShortTensor paddle.to_tensor 功能一致,仅 paddle 参数更多,差异对比
302 torch.Tensor.copysign 功能缺失
303 torch.Tensor.dequantize 功能缺失
304 torch.Tensor.sum_to_size 功能缺失
305 torch.Tensor.resize_ 功能缺失
306 torch.Tensor.masked_fill_ paddle.Tensor.masked_fill_ 功能一致,参数完全一致,差异对比
307 torch.Tensor.tensor_split paddle.Tensor.tensor_split 功能一致,仅参数名不一致,差异对比
308 torch.Tensor.masked_scatter paddle.Tensor.masked_scatter 功能一致,参数完全一致,差异对比
309 torch.Tensor.masked_scatter_ paddle.Tensor.masked_scatter_ 功能一致,参数完全一致,差异对比
310 torch.Tensor.apply_ paddle.Tensor.apply_ 功能一致,参数完全一致,差异对比

持续更新...

torch.nn.utils.XX API 映射列表

梳理了torch.nn.utils.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.nn.utils.clip_grad_value_ paddle.nn.utils.clip_grad_value_ 功能一致,参数完全一致,差异对比
2 torch.nn.utils.remove_weight_norm paddle.nn.utils.remove_weight_norm 功能一致,仅参数名不一致,差异对比
3 torch.nn.utils.spectral_norm paddle.nn.utils.spectral_norm 功能一致,仅参数名不一致,差异对比
4 torch.nn.utils.weight_norm paddle.nn.utils.weight_norm 功能一致,仅参数名不一致,差异对比
5 torch.nn.utils.parametrize.is_parametrized 功能缺失
6 torch.nn.utils.parameters_to_vector paddle.nn.utils.parameters_to_vector 功能一致,参数完全一致,差异对比
7 torch.nn.utils.vector_to_parameters paddle.nn.utils.vector_to_parameters 功能一致,参数完全一致,差异对比
8 torch.nn.utils.clip_grad_norm_ paddle.nn.utils.clip_grad_norm_ 功能一致,参数完全一致,差异对比
9 torch.nn.utils.parametrizations.spectral_norm paddle.nn.utils.spectral_norm 功能一致,仅参数名不一致,差异对比

持续更新...

torch.nn.Module.XX API 映射列表

梳理了torch.nn.Module.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.nn.Module.to_empty 功能缺失
2 torch.nn.Module.register_full_backward_pre_hook 功能缺失
3 torch.nn.Module.register_full_backward_hook 功能缺失
4 torch.nn.Module.requires_grad_ 功能缺失
5 torch.nn.Module.add_module paddle.nn.Layer.add_sublayer 功能一致,仅参数名不一致,差异对比
6 torch.nn.Module.apply paddle.nn.Layer.apply 功能一致,参数完全一致,差异对比
7 torch.nn.Module.bfloat16 paddle.nn.Layer.to 功能一致,参数不一致,差异对比
8 torch.nn.Module.buffers paddle.nn.Layer.buffers 功能一致,仅参数名不一致,差异对比
9 torch.nn.Module.children paddle.nn.Layer.children 功能一致,无参数,差异对比
10 torch.nn.Module.cpu paddle.nn.Layer.to 功能一致,参数不一致,差异对比
11 torch.nn.Module.cuda paddle.nn.Layer.to 功能一致,参数不一致,差异对比
12 torch.nn.Module.double paddle.nn.Layer.to 功能一致,参数不一致,差异对比
13 torch.nn.Module.eval paddle.nn.Layer.eval 功能一致,无参数,差异对比
14 torch.nn.Module.float paddle.nn.Layer.to 功能一致,参数不一致,差异对比
15 torch.nn.Module.get_buffer 组合替代实现,差异对比
16 torch.nn.Module.get_parameter 组合替代实现,差异对比
17 torch.nn.Module.get_submodule 组合替代实现,差异对比
18 torch.nn.Module.half paddle.nn.Layer.to 功能一致,参数不一致,差异对比
19 torch.nn.Module.load_state_dict paddle.nn.Layer.set_state_dict 功能一致,仅参数名不一致,差异对比
20 torch.nn.Module.named_buffers paddle.nn.Layer.named_buffers 功能一致,torch 参数更多,差异对比
21 torch.nn.Module.named_children paddle.nn.Layer.named_children 功能一致,无参数,差异对比
22 torch.nn.Module.named_modules paddle.nn.Layer.named_sublayers 功能一致,torch 参数更多,差异对比
23 torch.nn.Module.named_parameters paddle.nn.Layer.named_parameters 功能一致,torch 参数更多,差异对比
24 torch.nn.Module.parameters paddle.nn.Layer.parameters 功能一致,仅参数名不一致,差异对比
25 torch.nn.Module.register_buffer paddle.nn.Layer.register_buffer 功能一致,仅参数名不一致,差异对比
26 torch.nn.Module.register_forward_hook paddle.nn.Layer.register_forward_post_hook 功能一致,torch 参数更多,差异对比
27 torch.nn.Module.register_forward_pre_hook paddle.nn.Layer.register_forward_pre_hook 功能一致,torch 参数更多,差异对比
28 torch.nn.Module.register_module paddle.nn.Layer.add_sublayer 功能一致,仅参数名不一致,差异对比
29 torch.nn.Module.register_parameter paddle.nn.Layer.add_parameter 功能一致,仅参数名不一致,差异对比
30 torch.nn.Module.state_dict paddle.nn.Layer.state_dict 功能一致,torch 参数更多,差异对比
31 torch.nn.Module.to paddle.nn.Layer.to 功能一致,参数不一致,差异对比
32 torch.nn.Module.train paddle.nn.Layer.train 功能一致,无参数,差异对比
33 torch.nn.Module.type paddle.nn.Layer.astype 功能一致,参数不一致,差异对比
34 torch.nn.Module.xpu paddle.nn.Layer.to 功能一致,参数不一致,差异对比
35 torch.nn.Module.zero_grad paddle.nn.Layer.clear_gradients 功能一致,torch 参数更多,差异对比
36 torch.nn.Module paddle.nn.Layer 功能一致,仅 paddle 参数更多,差异对比

持续更新...

torch.autograd.XX API 映射列表

梳理了torch.autograd.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.autograd.profiler.profile.self_cpu_time_total 功能缺失
2 torch.autograd.function.FunctionCtx.mark_dirty 功能缺失
3 torch.autograd.backward paddle.autograd.backward 功能一致,torch 参数更多,差异对比
4 torch.autograd.Function.backward paddle.autograd.PyLayer.backward 功能一致,仅 paddle 参数更多,差异对比
5 torch.autograd.Function.forward paddle.autograd.PyLayer.forward 功能一致,参数完全一致,差异对比
6 torch.autograd.function.FunctionCtx.mark_non_differentiable paddle.autograd.PyLayerContext.mark_non_differentiable 功能一致,仅参数名不一致,差异对比
7 torch.autograd.function.FunctionCtx.save_for_backward paddle.autograd.PyLayerContext.save_for_backward 功能一致,参数完全一致,差异对比
8 torch.autograd.function.FunctionCtx.set_materialize_grads paddle.autograd.PyLayerContext.set_materialize_grads 功能一致,参数完全一致,差异对比
9 torch.autograd.Function paddle.autograd.PyLayer 功能一致,torch 参数更多,差异对比
10 torch.autograd.functional.hessian paddle.incubate.autograd.Hessian 功能一致,torch 参数更多,差异对比
11 torch.autograd.functional.jacobian paddle.incubate.autograd.Jacobian 功能一致,torch 参数更多,差异对比
12 torch.autograd.functional.jvp paddle.incubate.autograd.jvp 功能一致,torch 参数更多,差异对比
13 torch.autograd.functional.vjp paddle.incubate.autograd.vjp 功能一致,torch 参数更多,差异对比
14 torch.autograd.grad paddle.grad 功能一致,torch 参数更多,差异对比
15 torch.autograd.graph.saved_tensors_hooks paddle.autograd.saved_tensors_hooks 功能一致,参数完全一致,差异对比
16 torch.autograd.profiler.profile.export_chrome_trace paddle.profiler.export_chrome_tracing 功能一致,仅 paddle 参数更多,差异对比

持续更新...

torch.cuda.XX API 映射列表

梳理了torch.cuda.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.cuda.max_memory_allocated paddle.device.cuda.max_memory_allocated 功能一致,参数完全一致,差异对比
2 torch.cuda.Event paddle.device.cuda.Event 功能一致,参数完全一致,差异对比
3 torch.cuda.current_device paddle.framework._current_expected_place 功能一致,无参数,差异对比
4 torch.cuda.current_stream paddle.device.cuda.current_stream 功能一致,参数完全一致,差异对比
5 torch.cuda.device_count paddle.device.cuda.device_count 功能一致,无参数,差异对比
6 torch.cuda.get_device_capability paddle.device.cuda.get_device_capability 功能一致,参数完全一致,差异对比
7 torch.cuda.get_device_properties paddle.device.cuda.get_device_properties 功能一致,参数完全一致,差异对比
8 torch.cuda.set_device paddle.device.set_device 功能一致,参数不一致,差异对比
9 torch.cuda.empty_cache paddle.device.cuda.empty_cache 功能一致,无参数,差异对比
10 torch.cuda.manual_seed paddle.seed 功能一致,参数不一致,差异对比
11 torch.cuda.max_memory_reserved paddle.device.cuda.max_memory_reserved 功能一致,参数完全一致,差异对比
12 torch.cuda.max_memory_allocated paddle.device.cuda.max_memory_allocated 功能一致,参数完全一致,差异对比
13 torch.cuda.memory_reserved paddle.device.cuda.memory_reserved 功能一致,参数完全一致,差异对比
14 torch.cuda.memory_allocated paddle.device.cuda.memory_allocated 功能一致,参数完全一致,差异对比
15 torch.cuda.synchronize paddle.device.cuda.synchronize 功能一致,参数完全一致,差异对比
16 torch.cuda.memory_usage 功能缺失
17 torch.cuda.mem_get_info 功能缺失
18 torch.cuda.set_rng_state 功能缺失
19 torch.cuda.default_stream 功能缺失
20 torch.cuda.get_arch_list 功能缺失
21 torch.cuda.is_initialized 功能缺失
22 torch.cuda.StreamContext 功能缺失
23 torch.cuda.is_current_stream_capturing 功能缺失
24 torch.cuda.amp.autocast paddle.amp.auto_cast 功能一致,仅 paddle 参数更多,差异对比
25 torch.cuda.amp.GradScaler paddle.amp.GradScaler 功能一致,仅参数默认值不一致,差异对比
26 torch.cuda.comm.broadcast paddle.distributed.broadcast 功能一致,torch 参数更多,差异对比
27 torch.cuda.device paddle.CUDAPlace 功能一致,参数不一致,差异对比
28 torch.cuda.DoubleTensor paddle.to_tensor 功能一致,仅 paddle 参数更多,差异对比
29 torch.cuda.get_device_name paddle.device.cuda.get_device_properties 功能一致,参数不一致,差异对比
30 torch.cuda.get_rng_state_all paddle.get_rng_state 功能一致,参数不一致,差异对比
31 torch.cuda.HalfTensor paddle.to_tensor 功能一致,仅 paddle 参数更多,差异对比
32 torch.cuda.is_available paddle.device.cuda.device_count 组合替代实现,差异对比
33 torch.cuda.manual_seed_all paddle.seed 功能一致,参数完全一致,差异对比
34 torch.cuda.nvtx.range_pop paddle.fluid.core.nvprof_nvtx_pop 功能一致,无参数,差异对比
35 torch.cuda.nvtx.range_push paddle.fluid.core.nvprof_nvtx_push 功能一致,仅参数名不一致,差异对比
36 torch.cuda.set_rng_state_all paddle.set_rng_state 功能一致,参数不一致,差异对比
37 torch.cuda.set_stream paddle.device.set_stream 功能一致,参数完全一致,差异对比
38 torch.cuda.ShortTensor paddle.to_tensor 功能一致,仅 paddle 参数更多,差异对比
39 torch.cuda.stream paddle.device.cuda.stream_guard 功能一致,参数完全一致,差异对比
40 torch.cuda.Stream paddle.device.cuda.Stream 功能一致,参数不一致,差异对比

持续更新...

torch.distributed.XX API 映射列表

梳理了torch.distributed.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.distributed.init_process_group paddle.distributed.init_parallel_env 功能一致,torch 参数更多,差异对比
2 torch.distributed.barrier paddle.distributed.barrier 功能一致,torch 参数更多,差异对比
3 torch.distributed.ReduceOp paddle.distributed.ReduceOp 功能一致,torch 参数更多,差异对比
4 torch.distributed.rpc.WorkerInfo 功能缺失
5 torch.distributed.rpc.functions.async_execution 功能缺失
6 torch.distributed.broadcast_multigpu 功能缺失
7 torch.distributed.all_reduce_multigpu 功能缺失
8 torch.distributed.reduce_multigpu 功能缺失
9 torch.distributed.all_gather_multigpu 功能缺失
10 torch.distributed.reduce_scatter_multigpu 功能缺失
11 torch.distributions.constraints.Constraint 功能缺失
12 torch.distributions.constraint_registry.ConstraintRegistry 功能缺失
13 torch.distributed.all_gather paddle.distributed.all_gather 功能一致,参数不一致,差异对比
14 torch.distributed.all_gather_object paddle.distributed.all_gather_object 功能一致,参数完全一致,差异对比
15 torch.distributed.all_reduce paddle.distributed.all_reduce 功能一致,参数不一致,差异对比
16 torch.distributed.all_to_all paddle.distributed.alltoall 功能一致,参数不一致,差异对比
17 torch.distributed.broadcast paddle.distributed.broadcast 功能一致,参数不一致,差异对比
18 torch.distributed.broadcast_object_list paddle.distributed.broadcast_object_list 功能一致,torch 参数更多,差异对比
19 torch.distributed.get_rank paddle.distributed.get_rank 功能一致,参数完全一致,差异对比
20 torch.distributed.get_world_size paddle.distributed.get_world_size 功能一致,参数完全一致,差异对比
21 torch.distributed.irecv paddle.distributed.irecv 功能一致,torch 参数更多,差异对比
22 torch.distributed.isend paddle.distributed.isend 功能一致,torch 参数更多,差异对比
23 torch.distributed.new_group paddle.distributed.new_group 功能一致,torch 参数更多,差异对比
24 torch.distributed.recv paddle.distributed.recv 功能一致,torch 参数更多,差异对比
25 torch.distributed.reduce paddle.distributed.reduce 功能一致,参数不一致,差异对比
26 torch.distributed.reduce_scatter paddle.distributed.reduce_scatter 功能一致,参数不一致,差异对比
27 torch.distributed.rpc.get_worker_info paddle.distributed.rpc.get_worker_info 功能一致,仅参数名不一致,差异对比
28 torch.distributed.rpc.rpc_async paddle.distributed.rpc.rpc_async 功能一致,仅参数名不一致,差异对比
29 torch.distributed.rpc.rpc_sync paddle.distributed.rpc.rpc_sync 功能一致,仅参数名不一致,差异对比
30 torch.distributed.rpc.shutdown paddle.distributed.rpc.shutdown 功能一致,torch 参数更多,差异对比
31 torch.distributed.scatter paddle.distributed.scatter 功能一致,参数不一致,差异对比
32 torch.distributed.scatter_object_list paddle.distributed.scatter_object_list 功能一致,仅参数名不一致,差异对比
33 torch.distributed.send paddle.distributed.send 功能一致,torch 参数更多,差异对比

持续更新...

torch.distributions.XX API 映射列表

梳理了torch.distributions.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.distributions.kl.kl_divergence paddle.distribution.kl_divergence 功能一致,参数完全一致,差异对比
2 torch.distributions.kl.register_kl paddle.distribution.register_kl 功能一致,仅参数名不一致,差异对比
3 torch.distributions.binomial.Binomial 功能缺失
4 torch.distributions.continuous_bernoulli.ContinuousBernoulli 功能缺失
5 torch.distributions.exponential.Exponential 功能缺失
6 torch.distributions.one_hot_categorical.OneHotCategorical 功能缺失
7 torch.distributions.transforms.CumulativeDistributionTransform 功能缺失
8 torch.distributions.transforms.SoftplusTransform 功能缺失
9 torch.distributions.bernoulli.Bernoulli paddle.distribution.Bernoulli 功能一致,torch 参数更多,差异对比
10 torch.distributions.beta.Beta paddle.distribution.Beta 功能一致,torch 参数更多,差异对比
11 torch.distributions.categorical.Categorical paddle.distribution.Categorical 功能一致,torch 参数更多,差异对比
12 torch.distributions.cauchy.Cauchy paddle.distribution.Cauchy 功能一致,torch 参数更多,差异对比
13 torch.distributions.dirichlet.Dirichlet paddle.distribution.Dirichlet 功能一致,torch 参数更多,差异对比
14 torch.distributions.distribution.Distribution paddle.distribution.Distribution 功能一致,torch 参数更多,差异对比
15 torch.distributions.exp_family.ExponentialFamily paddle.distribution.ExponentialFamily 功能一致,torch 参数更多,差异对比
16 torch.distributions.geometric.Geometric paddle.distribution.Geometric 功能一致,torch 参数更多,差异对比
17 torch.distributions.gumbel.Gumbel paddle.distribution.Gumbel 功能一致,torch 参数更多,差异对比
18 torch.distributions.independent.Independent paddle.distribution.Independent 功能一致,torch 参数更多,差异对比
19 torch.distributions.laplace.Laplace paddle.distribution.Laplace 功能一致,torch 参数更多,差异对比
20 torch.distributions.log_normal.LogNormal paddle.distribution.Normal 功能一致,torch 参数更多,差异对比
21 torch.distributions.multinomial.Multinomial paddle.distribution.Multinomial 功能一致,torch 参数更多,差异对比
22 torch.distributions.normal.Normal paddle.distribution.Normal 功能一致,torch 参数更多,差异对比
23 torch.distributions.transformed_distribution.TransformedDistribution paddle.distribution.TransformedDistribution 功能一致,torch 参数更多,差异对比
24 torch.distributions.transforms.ComposeTransform paddle.distribution.ChainTransform 功能一致,torch 参数更多,差异对比
25 torch.distributions.transforms.IndependentTransform paddle.distribution.IndependentTransform 功能一致,torch 参数更多,差异对比
26 torch.distributions.transforms.ReshapeTransform paddle.distribution.ReshapeTransform 功能一致,torch 参数更多,差异对比
27 torch.distributions.transforms.SoftmaxTransform paddle.distribution.SoftmaxTransform 功能一致,torch 参数更多,差异对比
28 torch.distributions.transforms.StackTransform paddle.distribution.StackTransform 功能一致,torch 参数更多,差异对比
29 torch.distributions.transforms.StickBreakingTransform paddle.distribution.StickBreakingTransform 功能一致,torch 参数更多,差异对比
30 torch.distributions.transforms.Transform paddle.distribution.Transform 功能一致,torch 参数更多,差异对比
31 torch.distributions.uniform.Uniform paddle.distribution.Uniform 功能一致,torch 参数更多,差异对比
32 torch.distributions.transforms.CatTransform 功能缺失

持续更新...

torch.fft.XX API 映射列表

梳理了torch.fft.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.fft.fftshift paddle.fft.fftshift 功能一致,仅参数名不一致,差异对比
2 torch.fft.ifftshift paddle.fft.ifftshift 功能一致,仅参数名不一致,差异对比
3 torch.fft.hfft2 paddle.fft.hfft2 功能一致,torch 参数更多,差异对比
4 torch.fft.hfftn paddle.fft.hfftn 功能一致,torch 参数更多,差异对比
5 torch.fft.ihfft2 paddle.fft.ihfft2 功能一致,torch 参数更多,差异对比
6 torch.fft.ihfftn paddle.fft.ihfftn 功能一致,torch 参数更多,差异对比
7 torch.fft.fft paddle.fft.fft 功能一致,torch 参数更多,差异对比
8 torch.fft.fft2 paddle.fft.fft2 功能一致,torch 参数更多,差异对比
9 torch.fft.fftfreq paddle.fft.fftfreq 功能一致,torch 参数更多,差异对比
10 torch.fft.fftn paddle.fft.fftn 功能一致,torch 参数更多,差异对比
11 torch.fft.hfft paddle.fft.hfft 功能一致,torch 参数更多,差异对比
12 torch.fft.ifft paddle.fft.ifft 功能一致,torch 参数更多,差异对比
13 torch.fft.ifft2 paddle.fft.ifft2 功能一致,torch 参数更多,差异对比
14 torch.fft.ifftn paddle.fft.ifftn 功能一致,torch 参数更多,差异对比
15 torch.fft.ihfft paddle.fft.ihfft 功能一致,torch 参数更多,差异对比
16 torch.fft.irfft paddle.fft.irfft 功能一致,torch 参数更多,差异对比
17 torch.fft.irfft2 paddle.fft.irfft2 功能一致,torch 参数更多,差异对比
18 torch.fft.irfftn paddle.fft.irfftn 功能一致,torch 参数更多,差异对比
19 torch.fft.rfft paddle.fft.rfft 功能一致,torch 参数更多,差异对比
20 torch.fft.rfftfreq paddle.fft.rfftfreq 功能一致,torch 参数更多,差异对比
21 torch.fft.rfftn paddle.fft.rfftn 功能一致,torch 参数更多,差异对比

持续更新...

torch.hub.XX API 映射列表

梳理了torch.hub.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.hub.get_dir 功能缺失
2 torch.hub.set_dir 功能缺失
3 torch.hub.download_url_to_file paddle.hub.download_url_to_file 功能一致,torch 参数更多,差异对比
4 torch.hub.help paddle.hub.help 功能一致,torch 参数更多,差异对比
5 torch.hub.list paddle.hub.list 功能一致,torch 参数更多,差异对比
6 torch.hub.load paddle.hub.load 功能一致,torch 参数更多,差异对比

持续更新...

torch.linalg.XX API 映射列表

梳理了torch.linalg.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.linalg.svd paddle.linalg.svd 功能一致,torch 参数更多,差异对比
2 torch.linalg.matrix_power paddle.linalg.matrix_power 功能一致,torch 参数更多,差异对比
3 torch.linalg.matrix_exp paddle.linalg.matrix_exp 功能一致,仅参数名不一致,差异对比
4 torch.linalg.cholesky paddle.linalg.cholesky 功能一致,torch 参数更多,差异对比
5 torch.linalg.matrix_rank paddle.linalg.matrix_rank 功能一致,torch 参数更多,差异对比
6 torch.linalg.cross paddle.cross 功能一致,torch 参数更多,差异对比
7 torch.linalg.lu 组合替代实现,差异对比
8 torch.linalg.solve_triangular paddle.linalg.triangular_solve 功能一致,torch 参数更多,差异对比
9 torch.linalg.eigvals paddle.linalg.eigvals 功能一致,torch 参数更多,差异对比
10 torch.linalg.eig paddle.linalg.eig 功能一致,torch 参数更多,差异对比
11 torch.linalg.multi_dot paddle.linalg.multi_dot 功能一致,torch 参数更多,差异对比
12 torch.linalg.matrix_exp 功能缺失
13 torch.linalg.matrix_norm 功能缺失
14 torch.linalg.vector_norm 功能缺失
15 torch.linalg.cholesky_ex 功能缺失
16 torch.linalg.inv_ex 功能缺失
17 torch.linalg.cond paddle.linalg.cond 功能一致,torch 参数更多,差异对比
18 torch.linalg.det paddle.linalg.det 功能一致,torch 参数更多,差异对比
19 torch.linalg.diagonal paddle.diagonal 功能一致,仅参数默认值不一致,差异对比
20 torch.linalg.eigh paddle.linalg.eigh 功能一致,torch 参数更多,差异对比
21 torch.linalg.eigvalsh paddle.linalg.eigvalsh 功能一致,torch 参数更多,差异对比
22 torch.linalg.inv paddle.linalg.inv 功能一致,torch 参数更多,差异对比
23 torch.linalg.matmul paddle.matmul 功能一致,torch 参数更多,差异对比
24 torch.linalg.norm paddle.linalg.norm 功能一致,torch 参数更多,差异对比
25 torch.linalg.pinv paddle.linalg.pinv 功能一致,torch 参数更多,差异对比
26 torch.linalg.qr paddle.linalg.qr 功能一致,torch 参数更多,差异对比
27 torch.linalg.slogdet paddle.linalg.slogdet 功能一致,参数不一致,差异对比
28 torch.linalg.solve paddle.linalg.solve 功能一致,torch 参数更多,差异对比
29 torch.linalg.svdvals paddle.linalg.svd 功能一致,torch 参数更多,差异对比
30 torch.linalg.vander paddle.vander 功能一致,仅 paddle 参数更多,差异对比
31 torch.linalg.cholesky_ex 功能缺失
32 torch.linalg.inv_ex 功能缺失

持续更新...

torch.onnx.XX API 映射列表

梳理了torch.onnx.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.onnx.enable_log 功能缺失
2 torch.onnx.disable_log 功能缺失
3 torch.onnx.export paddle.onnx.export 功能一致,torch 参数更多,差异对比

持续更新...

torch.optim.XX API 映射列表

梳理了torch.optim.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.optim.lr_scheduler.LinearLR 功能缺失
2 torch.optim.Adadelta paddle.optimizer.Adadelta 功能一致,torch 参数更多,差异对比
3 torch.optim.Adagrad paddle.optimizer.Adagrad 功能一致,torch 参数更多,差异对比
4 torch.optim.Adam paddle.optimizer.Adam 功能一致,torch 参数更多,差异对比
5 torch.optim.Adamax paddle.optimizer.Adamax 功能一致,torch 参数更多,差异对比
6 torch.optim.AdamW paddle.optimizer.AdamW 功能一致,torch 参数更多,差异对比
7 torch.optim.LBFGS paddle.optimizer.LBFGS 功能一致,仅 paddle 参数更多,差异对比
8 torch.optim.lr_scheduler.ConstantLR paddle.optimizer.lr.PiecewiseDecay 组合替代实现,差异对比
9 torch.optim.lr_scheduler.CosineAnnealingLR paddle.optimizer.lr.CosineAnnealingDecay 组合替代实现,差异对比
10 torch.optim.lr_scheduler.CyclicLR paddle.optimizer.lr.CyclicLR 组合替代实现,差异对比
11 torch.optim.lr_scheduler.ExponentialLR paddle.optimizer.lr.ExponentialDecay 组合替代实现,差异对比
12 torch.optim.lr_scheduler.LambdaLR paddle.optimizer.lr.LambdaDecay 组合替代实现,差异对比
13 torch.optim.lr_scheduler.MultiplicativeLR paddle.optimizer.lr.MultiplicativeDecay 组合替代实现,差异对比
14 torch.optim.lr_scheduler.MultiStepLR paddle.optimizer.lr.MultiStepDecay 组合替代实现,差异对比
15 torch.optim.lr_scheduler.OneCycleLR paddle.optimizer.lr.OneCycleLR 组合替代实现,差异对比
16 torch.optim.lr_scheduler.ReduceLROnPlateau paddle.optimizer.lr.ReduceOnPlateau 组合替代实现,差异对比
17 torch.optim.lr_scheduler.StepLR paddle.optimizer.lr.StepDecay 组合替代实现,差异对比
18 torch.optim.Optimizer.load_state_dict paddle.optimzier.Optimizer.set_state_dict 功能一致,参数完全一致,差异对比
19 torch.optim.Optimizer paddle.optimizer.Optimizer 功能一致,仅 paddle 参数更多,差异对比
20 torch.optim.Optimizer.state_dict paddle.optimizer.Optimizer.state_dict 功能一致,无参数,差异对比
21 torch.optim.Optimizer.step paddle.optimizer.Optimizer.step 功能一致,torch 参数更多,差异对比
22 torch.optim.RMSprop paddle.optimizer.RMSProp 功能一致,torch 参数更多,差异对比
23 torch.optim.SGD paddle.optimizer.SGD 功能一致,torch 参数更多,差异对比
24 torch.optim.Optimizer.add_param_group paddle.optimizer.Optimizer._add_param_group 功能一致,参数完全一致,差异对比

持续更新...

torch.profiler.XX API 映射列表

梳理了torch.profiler.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.profiler.ProfilerActivity 功能缺失
2 torch.profiler.ProfilerAction 功能缺失
3 torch.profiler.profile paddle.profiler.Profiler 功能一致,torch 参数更多,差异对比
4 torch.profiler.schedule paddle.profiler.make_scheduler 功能一致,仅参数名不一致,差异对比

持续更新...

torch.sparse.XX API 映射列表

梳理了torch.sparse.XX类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.sparse.addmm paddle.sparse.admm 功能一致,仅参数名不一致,差异对比
2 torch.sparse.mm paddle.sparse.matmul 功能一致,仅参数名不一致,差异对比
3 torch.sparse.softmax paddle.sparse.nn.functional.softmax 功能一致,torch 参数更多,差异对比
4 torch.sparse.sum 功能缺失
5 torch.sparse.sampled_addmm 功能缺失

持续更新...

其他类 API 映射列表

梳理了其他类 API 的 PyTorch-PaddlePaddle API 映射列表。

序号 PyTorch API PaddlePaddle API 备注
1 torch.utils.data.random_split paddle.io.random_split 功能一致,参数不一致,差异对比
2 torch.utils.data.distributed.DistributedSampler paddle.io.DistributedBatchSampler 功能一致,参数不一致,差异对比
3 torch.utils.data.Dataset paddle.io.Dataset 功能一致,无参数,差异对比
4 torch.utils.data.BatchSampler paddle.io.BatchSampler 功能一致,仅 paddle 参数更多,差异对比
5 torch.utils.data.Sampler paddle.io.Sampler 功能一致,参数完全一致,差异对比
6 torch.random.manual_seed paddle.seed 功能一致,参数完全一致,差异对比
7 torch.special.expm1 paddle.expm1 功能一致,torch 参数更多,差异对比
8 torch.backends.cudnn.version 功能缺失
9 torch.special.erf paddle.erf 功能一致,torch 参数更多,差异对比
10 torch.special.entr 功能缺失
11 torch.backends.cuda.is_built paddle.device.is_compiled_with_cuda 功能一致,无参数,差异对比
12 torch.backends.cudnn.is_available 组合替代实现,差异对比
13 torch.jit.load paddle.jit.load 功能一致,torch 参数更多,差异对比
14 torch.multiprocessing.spawn paddle.distributed.spawn 功能一致,torch 参数更多,差异对比
15 torch.random.get_rng_state paddle.get_rng_state 功能一致,参数不一致,差异对比
16 torch.initial_seed 组合替代实现,差异对比
17 torch.random.seed 组合替代实现,差异对比
18 torch.random.set_rng_state paddle.set_rng_state 功能一致,参数不一致,差异对比
19 torch.special.digamma paddle.digamma 功能一致,torch 参数更多,差异对比
20 torch.special.erfc 组合替代实现,差异对比
21 torch.special.erfcx 组合替代实现,差异对比
22 torch.special.erfinv paddle.erfinv 功能一致,torch 参数更多,差异对比
23 torch.special.exp2 组合替代实现,差异对比
24 torch.special.expit 组合替代实现,差异对比
25 torch.special.gammaln paddle.lgamma 功能一致,torch 参数更多,差异对比
26 torch.special.i0 paddle.i0 功能一致,torch 参数更多,差异对比
27 torch.special.i0e paddle.i0e 功能一致,torch 参数更多,差异对比
28 torch.special.i1 paddle.i1 功能一致,torch 参数更多,差异对比
29 torch.special.i1e paddle.i1e 功能一致,torch 参数更多,差异对比
30 torch.special.log1p paddle.log1p 功能一致,torch 参数更多,差异对比
31 torch.special.logit paddle.logit 功能一致,torch 参数更多,差异对比
32 torch.special.logsumexp paddle.logsumexp 功能一致,torch 参数更多,差异对比
33 torch.special.log_softmax paddle.nn.functional.log_softmax 功能一致,仅参数名不一致,差异对比
34 torch.special.ndtri 组合替代实现,差异对比
35 torch.special.polygamma paddle.polygamma 功能一致,torch 参数更多,差异对比
36 torch.special.psi paddle.digamma 功能一致,torch 参数更多,差异对比
37 torch.special.round paddle.round 功能一致,torch 参数更多,差异对比
38 torch.special.sinc 组合替代实现,差异对比
39 torch.special.softmax paddle.nn.functional.softmax 功能一致,仅参数名不一致,差异对比
40 torch.special.xlog1py 组合替代实现,差异对比
41 torch.special.xlogy 组合替代实现,差异对比
42 torch.testing.assert_allclose 组合替代实现,差异对比
43 torch.utils.data.Subset paddle.io.Subset 功能一致,参数完全一致,差异对比
44 torch.utils.data.TensorDataset paddle.io.TensorDataset 功能一致,参数用法不一致,差异对比
45 torch.utils.data.WeightedRandomSampler paddle.io.WeightedRandomSampler 功能一致,参数完全一致,差异对比
46 torch.utils.data._utils.collate.default_collate paddle.io.dataloader.collate.default_collate_fn 功能一致,参数不一致,差异对比
47 torch.utils.data.ConcatDataset 功能缺失
48 torch.utils.data.IterableDataset paddle.io.IterableDataset 功能一致,无参数,差异对比
49 torch.utils.data.BatchSampler paddle.io.BatchSampler 功能一致,仅 paddle 参数更多,差异对比
50 torch.utils.data.DataLoader paddle.io.DataLoader 功能一致,参数不一致,差异对比
51 torch.utils.data.distributed.DistributedSampler paddle.io.DistributedBatchSampler 功能一致,参数不一致,差异对比
52 torch.utils.cpp_extension.CUDAExtension paddle.utils.cpp_extension.CUDAExtension 功能一致,torch 参数更多,差异对比
53 torch.utils.cpp_extension.CppExtension paddle.utils.cpp_extension.CppExtension 功能一致,torch 参数更多,差异对比
54 torch.utils.cpp_extension.load paddle.utils.cpp_extension.load 功能一致,torch 参数更多,差异对比
55 torch.utils.data.random_split paddle.io.random_split 功能一致,参数不一致,差异对比
56 torch.utils.dlpack.from_dlpack paddle.utils.dlpack.from_dlpack 功能一致,仅参数名不一致,差异对比
57 torch.utils.dlpack.to_dlpack paddle.utils.dlpack.to_dlpack 功能一致,仅参数名不一致,差异对比
58 torch.utils.cpp_extension.load_inline 功能缺失
59 torch.utils.cpp_extension.include_paths 功能缺失
60 torch.utils.cpp_extension.BuildExtension.with_options paddle.utils.cpp_extension.BuildExtension.with_options 功能一致,参数完全一致,差异对比
61 torch.utils.cpp_extension.CUDA_HOME paddle.utils.cpp_extension.cpp_extension.CUDA_HOME 功能一致,无参数,差异对比
62 torch.utils.cpp_extension.BuildExtension paddle.utils.cpp_extension.BuildExtension 功能一致,参数完全一致,差异对比
63 torch.utils.data.ChainDataset paddle.io.ChainDataset 功能一致,参数完全一致,差异对比
64 torch.utils.data.dataloader.default_collate paddle.io.dataloader.collate.default_collate_fn 功能一致,参数不一致,差异对比
65 torch.utils.data.default_collate paddle.io.dataloader.collate.default_collate_fn 功能一致,参数不一致,差异对比
66 torch.utils.data.DistributedSampler paddle.io.DistributedBatchSampler 功能一致,torch 参数更多,差异对比

持续更新...