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

[docs] Missing docs for Storage.from_buffer #30387

Open
vadimkantorov opened this issue Nov 24, 2019 · 5 comments
Open

[docs] Missing docs for Storage.from_buffer #30387

vadimkantorov opened this issue Nov 24, 2019 · 5 comments
Labels
module: docs Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@vadimkantorov
Copy link
Contributor

vadimkantorov commented Nov 24, 2019

https://pytorch.org/docs/master/storage.html#torch.FloatStorage.from_buffer

This method is useful when ingesting byte streams/arrays from external programs like sox or ffmpeg.

@izdeby izdeby added module: docs Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Nov 26, 2019
@albanD
Copy link
Collaborator

albanD commented Nov 26, 2019

Not a good justification but I think the historical reason is that we did not want the users to use it directly as it is fairly unsafe

@vadimkantorov
Copy link
Contributor Author

In absence of reinterpret functionality, this can serve as a crude substitute... In my case I read some external program byte output. I think this scenario is fairly frequent

@vadimkantorov
Copy link
Contributor Author

But if there is another method for this use case and reinterpret, I would be happy to abandon this from_buffer thing :)

@albanD
Copy link
Collaborator

albanD commented Nov 27, 2019

I agree that a good documentation explaining the details of how to use this function and a warning that is it only advanced user would be useful.

@ConfuzedCoder
Copy link

I want to reverse ToTensor transformation, Can someone add documentation for from_buffer().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: docs Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

4 participants