From 585fa07878b8aca45b28443c5e58e0fe0cf13726 Mon Sep 17 00:00:00 2001 From: Mathieu Poumeyrol Date: Tue, 19 Nov 2024 08:48:46 +0100 Subject: [PATCH] clips --- nnef/src/tensors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nnef/src/tensors.rs b/nnef/src/tensors.rs index abc99f0b83..a79ca324b5 100644 --- a/nnef/src/tensors.rs +++ b/nnef/src/tensors.rs @@ -237,7 +237,7 @@ pub fn write_tensor(w: &mut impl Write, tensor: &Tensor) -> TractResult<()> { w.write_all(tensor.as_bytes())?; } else if tensor.datum_type() == DatumType::String { for s in tensor.as_slice::()? { - w.write_u32::(s.as_bytes().len() as u32)?; + w.write_u32::(s.len() as u32)?; w.write_all(s.as_bytes())?; } }