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

Conversion from float std::vector to Aten Tensor and vice versa? #13

Open
kirill-pinigin opened this issue Jun 7, 2018 · 1 comment

Comments

@kirill-pinigin
Copy link

Conversion from float std::vector to Aten Tensor and vice versa?

@warmspringwinds
Copy link
Owner

warmspringwinds commented Jun 20, 2018

@kirill-pinigin Providing the .data() output of a vector to
a tensorFromBlob() function should work. Not really relevant but close example:
https://github.com/warmspringwinds/pytorch-cpp/blob/master/examples/read_allocated_gpu_memory.cpp#L64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants