-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Strided_slice 的异常行为 #43375
Comments
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档、常见问题、历史Issue、AI社区来寻求解答。祝您生活愉快~ 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 API,FAQ,Github Issue and AI community to get the answer.Have a nice day! |
你好,感谢反馈!经过排查stride_slice的参数为负数时确实存在一些问题。starts和ends参数的合理范围应该在[-shape_size, shape_size],在这个范围内设置参数值应该是没有问题的,这也是我们推荐的用法。但为了写起来更简单stride_slice也允许输入的参数超过这个范围:如果start和end的值大于对应维度的size,在处理时会将其设置为维度的size值;如果start和end的值小于0,会先加上shape_size,如果加完之后仍小于0则按0处理(stride小于0并且end为-1时除外,此时由于要从后往前选择到第0个元素,所以end需要为-1)。
第二个示例由于end值-9+2=-7仍小于0,所以需要按0处理,因此正确的结果应该是等价于:
|
Since you haven't replied for more than a year, we have closed this issue/pr. |
bug描述 Describe the Bug
上图结果由以下script得到,其中出现了OoTA值0,而且对于shape为(2,)的tensor可以传入大于2的start end,请问各个参数的合理范围是多少?或者是在三者有-1时,Strided_slice行为是怎样?
其他补充信息 Additional Supplementary Information
paddle 2.2 or 2.3
mac x86
python3.7
The text was updated successfully, but these errors were encountered: