Skip to content
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

转换规则No64 torch.nn.functional.max_pool1d #120

Merged
merged 15 commits into from
Aug 28, 2023

Conversation

Liyulingyue
Copy link
Contributor

PR Docs

根据表格信息,对应文档已存在,未找到对应PR

PR APIs

torch.nn.functional.max_pool1d

API Discriptions

#112 case 64

@paddle-bot
Copy link

paddle-bot bot commented Jun 23, 2023

Thanks for your contribution!

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Jun 23, 2023
],
"unsupport_args": [
"dilation",
"return_indices"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个return_indices应该是支持转化的,paddle和torch返回类型不同,int32和int64,属于风格差异,通过转化类型可以在单测里面进行比较

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

很抱歉隔了很久才开始处理这个问题,麻烦帮忙check一下增加的单元测试中的case5和case6,都使用了return index,但是case6的return shape是不同的

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jun 26, 2023
@Liyulingyue Liyulingyue changed the title [convert] torch.nn.functional.max_pool1d 转换规则No64 torch.nn.functional.max_pool1d Jun 27, 2023
@luotao1
Copy link
Collaborator

luotao1 commented Jul 7, 2023

请解决下冲突

input = torch.tensor([[[ 1.1524, 0.4714, 0.2857, 0.4586, 0.9876, 0.5487],
[-1.2533, -0.9829, -1.0981, 0.7655, 0.8541, 0.9873],
[ 0.1507, -1.1431, -2.0361, 0.2344, 0.5675, 0.1546]]])
result, index = F.max_pool1d(input , 5, stride=2, padding=2, ceil_mode=True, return_indices=True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return_indices=True 上面不是也有吗,但是没有报错

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

很抱歉回复晚了上面这两个的输入矩阵维度不同

@luotao1
Copy link
Collaborator

luotao1 commented Aug 18, 2023

@Liyulingyue 张师傅,别忘了这个PR哈

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR status: proposed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants