Function safetensors::tensor::serialize
source · pub fn serialize<S: AsRef<str> + Ord + Display, V: View, I: IntoIterator<Item = (S, V)>>(
data: I,
data_info: &Option<HashMap<String, String>>
) -> Result<Vec<u8>, SafeTensorError>
Expand description
Serialize to an owned byte buffer the dictionnary of tensors.