-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
【complex op】No.25 add complex support for fold #56914
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
PTAL @GGBond8488 @ScottWong98 |
test/legacy_test/test_fold_op.py
Outdated
).astype(self.dtype) | ||
|
||
def init_dtype(self): | ||
pass |
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.
pass
-> self.dtype = np.float64
test/legacy_test/test_fold_op.py
Outdated
@@ -40,6 +40,14 @@ def init_data(self): | |||
self.output_sizes = [4, 5] | |||
input_shape = [self.batch_size, self.input_channels, self.length] | |||
self.x = np.random.rand(*input_shape).astype(np.float64) |
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.
astype(np.float64)
-> astype(self.dtype)
@@ -75,7 +83,7 @@ def calc_fold(self): | |||
) | |||
+ 1 | |||
) | |||
output = np.zeros(output_shape).astype(np.float64) | |||
output = np.zeros(output_shape).astype(self.dtype) |
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.
建议 init_dtype
中给个 self.dtype 的默认值(np.float64)感觉会好些,不然这块在 TestFold 中 self.dtype = None,虽然最终结果没影响,但感觉有点不统一
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.
好的
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.
LGTM
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.
LGTM
@BeingGod 请修改下对应的中文文档 |
PR types
Others
PR changes
APIs
Description
add support complex for
fold
#56145