-
Notifications
You must be signed in to change notification settings - Fork 796
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
Fix handle_size_arg when len(size) == 0 #9975
Conversation
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.
测试加一下吧
@@ -47,6 +47,8 @@ def parse(x): | |||
|
|||
|
|||
def _handle_size_arg(size): | |||
if len(size) == 0: | |||
return size |
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.
补下测试,验证之前不能通过的 case 现在可以通过
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.
done
测试已加 |
修复两个问题:
flow.full
torch中:
修改方法当len(size)==0时直接返回size
new_full
在torch中:
oneflow中:
应用问题一的修改后,问题变为:
这是由于
_handle_meta_args
中所以返回的new_size是shape,导致了不一致