From 5911e0f5564c7aa23631cf480dfeeb33d59a671a Mon Sep 17 00:00:00 2001 From: Georgy Krivoruchko Date: Tue, 4 Jun 2024 12:43:49 +0400 Subject: [PATCH] Update src/frontends/tensorflow_lite/src/sparsity_info.cpp Co-authored-by: Roman Kazantsev --- src/frontends/tensorflow_lite/src/sparsity_info.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontends/tensorflow_lite/src/sparsity_info.cpp b/src/frontends/tensorflow_lite/src/sparsity_info.cpp index e074ecb1469084..ed0028cf0c306f 100644 --- a/src/frontends/tensorflow_lite/src/sparsity_info.cpp +++ b/src/frontends/tensorflow_lite/src/sparsity_info.cpp @@ -13,17 +13,17 @@ bool ov::frontend::tensorflow_lite::SparsityInfo::is_copyable() const { // Unpacks sparse data. Supports only case when sparse tensor has only one sparse dimension [DENSE, ..., DENSE, SPARSE] // TensorFlow Lite uses a specific format for storing sparse data (TACO): // It uses three 1D arrays/1D tensors/vectors: -// values - stored in a model's buffers -// segments/postions - list of row's start positions +// values - stored in model's buffers +// segments/positions - list of row's start positions // indices - list of value indexes in a row (size is equal to values) -// Algorithm is next, and it should be easily modified later for 2D spare matrices (that's why it uses a 2D approach): +// Algorithm is next, and it should be easily modified later for 2D sparse matrices (that's why it uses a 2D approach): // 1. Get a first segment position, set idx = 0 // In a cycle // 2. Get next segment position // 3. Get an element_count by a difference between current segment position and last_segment position. // If diff between last and current segment is 0 it means an empty row (contains only default values). // In cycle for each element in a segment: -// 4. Caclulate a row_offset using idx-th index by indeces and element_size (fp16/fp32/etc...) +// 4. Calculate a row_offset using idx-th index by indices and element_size (fp16/fp32/etc...) // 5. Put an idx-th value to a found target dest + row_offset // 6. Move to a next row template