We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Issue based on discussion #2315, @antimora
To my best knowledge, here's how to load a tensor:
In python: Ensure you wrap the tensor with dict before save, e.g.
torch.save({"some_key": tensor}, "path/to/tensor.pt")
In rust:
#[derive(Module, Debug)] struct FloatTensor<B: Backend, const D: usize> { some_key: Param<Tensor<B, D>>, } fn main() { type B = NdArray; let device = Default::default(); let tensor: FloatTensorRecord<B, 3> = PyTorchFileRecorder::<FullPrecisionSettings>::new() .load("path/to/tensor.pt".into(), &device) .unwrap(); let tensor = tensor.value.val(); }
The text was updated successfully, but these errors were encountered:
Hi, could I take up this issue?
Sorry, something went wrong.
Yes! Please go ahead. We would appreciate your contribution. Let me know if you need more info.
No branches or pull requests
Issue based on discussion #2315, @antimora
To my best knowledge, here's how to load a tensor:
In python:
Ensure you wrap the tensor with dict before save, e.g.
In rust:
The text was updated successfully, but these errors were encountered: