Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.

Change as_nested_tensor to only forward NestedTensor type #153

Merged
merged 8 commits into from
May 20, 2020

Conversation

cpuhrsch
Copy link
Contributor

@cpuhrsch cpuhrsch commented May 20, 2020

Resolves issue #150

as_nested_tensor now forwards NestedTensors only. This gets rid of the current view semantics of as_nested_tensor.

@cpuhrsch cpuhrsch requested a review from izdeby May 20, 2020 20:58
@cpuhrsch cpuhrsch changed the title Change as_nested_tensor only forward NestedTensor type Change as_nested_tensor to only forward NestedTensor type May 20, 2020


def as_nested_tensor(data, dtype=None, device=None):
# TODO: Needs tests to check failure cases
Copy link
Contributor

Choose a reason for hiding this comment

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

Just do it(c)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Follow-up PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because there is potentially a lot of edge cases

@cpuhrsch cpuhrsch merged commit 174be9e into pytorch:master May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants