Paddle 新增对含0维的Tensor的输入支持

2o7dmzc5  于 2022-12-31  发布在  其他
关注(0)|答案(2)|浏览(151)

需求描述 Feature Description

在和Pytorch 进行MaskFormer的对齐复现过程中发现torch对含0维tensor的支持很好,基本用户没有感知,但是paddle不支持,在进行interpolate、einsum、tensor索引、损失函数等。

比如输入x的shape为[0,512,512]是一种需要支持的情形。

替代实现 Alternatives

需要在代码逻辑中加入对于0维tensor的判断,并做特殊处理,过程中需要查看每处差异位置pytorch对0纬tensor的处理,因此处理过程十分复杂。

daolsyd0

daolsyd01#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网API文档常见问题历史IssueAI社区 来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

ghhaqwfi

ghhaqwfi2#

已反馈给相关同学。

相关问题