-
Notifications
You must be signed in to change notification settings - Fork 685
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
Add stack series api #8901
Add stack series api #8901
Conversation
@@ -268,6 +268,94 @@ | |||
""", | |||
) | |||
|
|||
add_docstr( | |||
oneflow.atleast_1d, | |||
r"""Returns a 1-D view of each input tensor with 0 dimensions. Tensors with dimensions greater than 0 will be returned directly. |
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.
这个语意应该是说低于1维的扩展为1维,高于1维的输入tensor直接返回,这里的描述可以refine一下,第一看没看懂。
|
||
@flow.unittest.skip_unless_1n1d() | ||
class TestAtLeast(flow.unittest.TestCase): | ||
@autotest(check_graph=True) |
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.
@autotest(check_graph=True) | |
@autotest(n=5) |
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.
顺便把global的测试也补了吧
@@ -44,6 +44,91 @@ def test_stack_bool_with_random_data(test_case): | |||
out = torch.stack((x, y), dim=random(low=1, high=4).to(int)) | |||
return out | |||
|
|||
@autotest(check_graph=True) |
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.
@autotest(check_graph=True) | |
@autotest(n=5) |
下同
@@ -299,6 +387,151 @@ | |||
""", | |||
) | |||
|
|||
add_docstr( | |||
oneflow.hstack, | |||
r"""Stack tensors in :attr:`tensors` horizontally (column wise). |
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.
按规范贴一下pytorch文档链接
@@ -268,6 +268,101 @@ | |||
""", | |||
) | |||
|
|||
add_docstr( | |||
oneflow.atleast_1d, | |||
r"""Returns a 1-dimensional view of each input tensor with zero dimensions. Input tensors with one or more dimensions are returned as-is. |
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.
Speed stats:
|
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8901/ |
Speed stats:
|
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8901/ |
CI failed when running job: cuda-module. PR label automerge has been removed |
Speed stats:
|
Speed stats:
|
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8901/ |
Speed stats:
|
背景:https://github.com/Oneflow-Inc/OneTeam/issues/1519
概述:缺少
column_stack
api实现:本PR实现了以下接口及其单测、文档
文档: