Miscellaneous¶
-
std::string metatensor_torch::version()¶
Get the version of metatensor_torch.
TensorMap Serialization¶
-
void metatensor_torch::save(const std::string &path, TorchTensorMap tensor)¶
Save the given
TensorMapto a file atpath
-
torch::Tensor metatensor_torch::save_buffer(TorchTensorMap tensor)¶
Save the given
TensorMapto an in-memory buffer (represented as atorch::Tensorof bytes)
-
TorchTensorMap metatensor_torch::load(const std::string &path)¶
Load a previously saved
TensorMapfrom the given path.
-
TorchTensorMap metatensor_torch::load_buffer(torch::Tensor buffer)¶
Load a previously saved
TensorMapfrom the given in-memory buffer (represented as atorch::Tensorof bytes)
Labels Serialization¶
-
void metatensor_torch::save(const std::string &path, TorchLabels labels)¶
Save the given
Labelsto a file atpath
-
torch::Tensor metatensor_torch::save_buffer(TorchLabels labels)¶
Save the given
Labelsto an in-memory buffer (represented as atorch::Tensorof bytes)
-
inline TorchLabels metatensor_torch::load_labels(const std::string &path)¶
Load previously saved
Labelsfrom the given path.
-
TorchLabels metatensor_torch::load_labels_buffer(torch::Tensor buffer)¶
Load previously saved
Labelsfrom the given in-memory buffer (represented as atorch::Tensorof bytes)