-
Notifications
You must be signed in to change notification settings - Fork 667
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
Support input check for pool operator #10532
base: master
Are you sure you want to change the base?
Conversation
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
414a637
to
b0881a8
Compare
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10532/ |
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10532/ |
Speed stats:
|
@@ -39,6 +39,15 @@ Maybe<void> CheckInplaceValid(const std::shared_ptr<Tensor>& x); | |||
Maybe<void> CheckInplaceCastValid(const std::shared_ptr<Tensor>& x, | |||
const std::shared_ptr<Tensor>& x_cast); | |||
Maybe<void> CheckInplaceShapeCanExpandTo(const Shape& shape, const Shape& expand_shape); | |||
|
|||
inline Maybe<void> CheckSizeNonNegative(const Shape& shape) { |
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.
这个名字改成CheckShapeNonNegative
吧
python/oneflow/nn/modules/pooling.py
Outdated
@@ -1100,6 +1164,27 @@ def __init__( | |||
self.padding = padding | |||
|
|||
def forward(self, x, indices, output_size=None): | |||
kernel_size = _single(self.kernel_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.
重复逻辑封装成函数
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10532/ |
Speed stats:
|
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10532/ |
Speed stats:
|
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10532/ |
Speed stats:
|
related issues:
closed #10523
closed #10522
closed #10521
closed #10519
closed #10518
closed #10512
closed #10511
closed #10510
closed #10509
closed #10508
closed #10507
closed #10506
closed #10505
closed #10504
closed #10503
closed #10502
closed #10501
closed #10500