Skip to content

Commit 195e43f

Browse files
committedFeb 15, 2024
Fixes from comments
1 parent 0db4887 commit 195e43f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎model_api/python/openvino/model_api/models/classification.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,13 @@ def postprocess(self, outputs, meta):
177177
)
178178

179179
def get_saliency_maps(self, outputs: Dict) -> np.ndarray:
180+
"""
181+
Returns saliency map model output. In hierarchical case reorder saliency maps
182+
to match the order of labels in .XML meta.
183+
"""
180184
saliency_maps = outputs.get(_saliency_map_name, np.ndarray(0))
181185
if not self.hierarchical:
182186
return saliency_maps
183-
# In hierarchical case reorder saliency maps to match the order of labels in .XML meta
184187
reordered_saliency_maps = [[] for _ in range(len(saliency_maps))]
185188
for batch in range(len(saliency_maps)):
186189
for label in self.labels:

0 commit comments

Comments
 (0)