Skip to content

Implement reshape_as #9452

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

Closed
wants to merge 3 commits into from
Closed

Conversation

vishwakftw
Copy link
Contributor

  1. Added tests
  2. Added doc string
  3. Remove view_as redundant definition from tensor.py

Closes #9416

1. Added tests
2. Added doc string
3. Remove view_as redundant definition from tensor.py
reshape_as(other) -> Tensor

Returns this tensor as the same shape as :attr:`other`.
``self.reshape_as(other)`` is equivalent to ``self.reshape(other.shape)``.

This comment was marked as off-topic.

r"""
view_as(other) -> Tensor

View this tensor as the same size as :attr:`other`.

This comment was marked as off-topic.

@ssnl
Copy link
Collaborator

ssnl commented Jul 15, 2018

Looks great in general!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ssnl has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ssnl
Copy link
Collaborator

ssnl commented Jul 15, 2018

Thanks @vishwakftw !

@ezyang
Copy link
Contributor

ezyang commented Jul 16, 2018

CI failures look fake

@vishwakftw vishwakftw deleted the resize_as-patch branch July 17, 2018 15:57
zdevito pushed a commit to zdevito/ATen that referenced this pull request Jul 17, 2018
Summary:
1. Added tests
2. Added doc string
3. Remove view_as redundant definition from tensor.py

Closes #9416
Pull Request resolved: pytorch/pytorch#9452

Differential Revision: D8851794

Pulled By: ezyang

fbshipit-source-id: 0aa0430dd0a174e1a5caddbc50a7e2c9eb7802bc
goldsborough pushed a commit to goldsborough/pytorch that referenced this pull request Jul 20, 2018
Summary:
1. Added tests
2. Added doc string
3. Remove view_as redundant definition from tensor.py

Closes pytorch#9416
Pull Request resolved: pytorch#9452

Differential Revision: D8851794

Pulled By: ezyang

fbshipit-source-id: 0aa0430dd0a174e1a5caddbc50a7e2c9eb7802bc
jramseyer pushed a commit to jramseyer/pytorch that referenced this pull request Jul 30, 2018
Summary:
1. Added tests
2. Added doc string
3. Remove view_as redundant definition from tensor.py

Closes pytorch#9416
Pull Request resolved: pytorch#9452

Differential Revision: D8851794

Pulled By: ezyang

fbshipit-source-id: 0aa0430dd0a174e1a5caddbc50a7e2c9eb7802bc
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary:
1. Added tests
2. Added doc string
3. Remove view_as redundant definition from tensor.py

Closes pytorch#9416
Pull Request resolved: pytorch#9452

Differential Revision: D8851794

Pulled By: ezyang

fbshipit-source-id: 0aa0430dd0a174e1a5caddbc50a7e2c9eb7802bc
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.

[feature request] reshape_as
4 participants