From 075b97ded8b02a7ec1739f8376c360bc19ba1164 Mon Sep 17 00:00:00 2001 From: peterjc123 Date: Thu, 7 Sep 2023 10:05:10 +0800 Subject: [PATCH] [converter] stop tracking ops with used constants (#250) --- tinynn/converter/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinynn/converter/base.py b/tinynn/converter/base.py index 59c850a8..b664f4a9 100644 --- a/tinynn/converter/base.py +++ b/tinynn/converter/base.py @@ -414,10 +414,10 @@ def init_operations(self): if self.common_graph.has_nested_names(n): nested_names = self.common_graph.get_list_expanded_names(n) for x in nested_names: - if x in self.common_graph.tensor_map: + if x in self.common_graph.tensor_map and self.common_graph.tensor_map[x].buffer is None: no_track_flag = False break - elif n in self.common_graph.tensor_map: + elif n in self.common_graph.tensor_map and self.common_graph.tensor_map[n].buffer is None: no_track_flag = False break if no_track_flag: