Skip to content
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 flow.view #5301

Merged
merged 14 commits into from
Jul 5, 2021
Merged

add flow.view #5301

merged 14 commits into from
Jul 5, 2021

Conversation

duchengyao
Copy link
Contributor

image

@register_tensor_op("view")
@experimental_api
def view_op(x, shape: Sequence[int] = None):
"""This operator reshapes a Tensor.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档对齐torch.view吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样行不

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以,你把测试分开写吧。以后view肯定要重构的,所以不要和reshape放一起。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

".numpy() doesn't work in lazy mode",
)
class TestModule(flow.unittest.TestCase):
def test_reshape(test_case):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里名字改一下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@duchengyao duchengyao requested review from oneflow-ci-bot and removed request for oneflow-ci-bot July 4, 2021 02:28
@oneflow-ci-bot oneflow-ci-bot removed their request for review July 4, 2021 03:38
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot July 4, 2021 05:19
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot July 4, 2021 14:46
@duchengyao duchengyao merged commit 9175492 into master Jul 5, 2021
@duchengyao duchengyao deleted the flow.view branch July 5, 2021 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants