-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
映射文档 No. 271/273/280/283/297/298/301/325/337/339-348 #6020
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6020.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
@@ -285,6 +285,16 @@ | |||
| 253 | [torch.nanmean](https://pytorch.org/docs/1.13/generated/torch.nanmean.html?highlight=nanmean#torch.nanmean) | [paddle.nanmean](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nanmean_cn.html) | 功能一致, torch 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.nanmean.md) | | |||
| 254 | [torch.take_along_dim](https://pytorch.org/docs/1.13/generated/torch.take_along_dim.html?highlight=torch+take_along_dim#torch.take_along_dim) | [paddle.take_along_axis](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/take_along_axis_cn.html) | 功能一致, torch 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.take_along_dim.md) | | |||
| 254 | [torch.geqrf](https://pytorch.org/docs/stable/generated/torch.geqrf.html?highlight=geqrf#torch.geqrf) | | 功能缺失 | | |||
| 255 | [torch.bitwise_right_shift](https://pytorch.org/docs/1.13/generated/torch.bitwise_right_shift.html#torch.bitwise_right_shift) | | 功能缺失 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些api有可以组合实现吗,用一些paddle已有的API实现这些功能。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要增加PaConvert转换规则,如果组合复杂没有合适转换规则
| 260 | [torch.scatter_reduce](https://pytorch.org/docs/1.13/generated/torch.scatter_reduce.html#torch.scatter_reduce) | | 功能缺失 | | ||
| 261 | [torch.set_deterministic_debug_mode](https://pytorch.org/docs/1.13/generated/torch.set_deterministic_debug_mode.html#torch.set_deterministic_debug_mode) | | 功能缺失 | | ||
| 262 | [torch.get_deterministic_debug_mode](https://pytorch.org/docs/1.13/generated/torch.get_deterministic_debug_mode.html#torch.get_deterministic_debug_mode) | | 功能缺失 | | ||
| 263 | [torch.vsplit](https://pytorch.org/docs/1.13/generated/torch.vsplit.html#torch.vsplit) | | 功能缺失 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些都缺失吗,paddle.vsplit能实现吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split相关的可以看看, torch和paddle API存在diff,但是看看像SplitMatcher一样能不能转
class SplitMatcher(BaseMatcher):
def generate_code(self, kwargs):
if "dim" in kwargs:
axis = kwargs["dim"]
else:
axis = 0
if "[" in kwargs["split_size_or_sections"]:
API_TEMPLATE = textwrap.dedent(
"""
paddle.split(x={}, num_or_sections={}, axis={})
"""
)
code = API_TEMPLATE.format(
kwargs["tensor"], kwargs["split_size_or_sections"], axis
)
else:
API_TEMPLATE = textwrap.dedent(
"""
paddle.split(x={}, num_or_sections={}.shape[{}]//{}, axis={})
"""
)
code = API_TEMPLATE.format(
kwargs["tensor"],
kwargs["tensor"],
axis,
kwargs["split_size_or_sections"],
axis,
)
return code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split相关的可以看看, torch和paddle API存在diff,但是看看像SplitMatcher一样能不能转
class SplitMatcher(BaseMatcher): def generate_code(self, kwargs): if "dim" in kwargs: axis = kwargs["dim"] else: axis = 0 if "[" in kwargs["split_size_or_sections"]: API_TEMPLATE = textwrap.dedent( """ paddle.split(x={}, num_or_sections={}, axis={}) """ ) code = API_TEMPLATE.format( kwargs["tensor"], kwargs["split_size_or_sections"], axis ) else: API_TEMPLATE = textwrap.dedent( """ paddle.split(x={}, num_or_sections={}.shape[{}]//{}, axis={}) """ ) code = API_TEMPLATE.format( kwargs["tensor"], kwargs["tensor"], axis, kwargs["split_size_or_sections"], axis, ) return code
PaddlePaddle/PaConvert#148
是要匹配torch.tensor_split
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
PaddlePaddle/PaConvert#112
271 torch.vsplit
273 torch.hsplit
280 torch.Tensor.hsplit
283 torch.Tensor.vsplit
297 torch.Tensor.dsplit
hsplit vsplit dsplit 在torch中对应torch.tensor_split,indices_or_sections 参数是序号,不是区块数,paddle.split中为区块数,所以不匹配
298 torch.Tensor.bitwise_right_shift
301 torch.bitwise_right_shift
325 torch.Tensor.is_conj
337 torch.is_conj
339 torch.diagonal_scatter
340 torch.select_scatter
341 torch.slice_scatter
342 torch.scatter_reduce
343 torch.set_deterministic_debug_mode
344 torch.get_deterministic_debug_mode
345 torch.Tensor.diagona_scatter
346 torch.Tensor.scatter_reduce
347 torch.Tensor.select_scatter
348 torch.Tensor.slice_scatter
paddle列表没有 bitwise_right_shift
is_conj搜索结果为空
scatter没有匹配api
deterministic_debug