-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Comments
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 |
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 |
But if there is another method for this use case and reinterpret, I would be happy to abandon this from_buffer thing :) |
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. |
I want to reverse ToTensor transformation, Can someone add documentation for from_buffer(). |
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.
The text was updated successfully, but these errors were encountered: