How to infer an image classification model by python?

Hello,

I trained and compile image classification model. so i created .hefmodel file .

In the Hailo Model Zoo, the CAS-ViT model normally has its final output layer named 1820, but I noticed that when generating the HEF file, the output node is actually set to the preceding layer, /head/Gemm.

I tried to apply the same concept to EfficientViT — the final output layer of EfficientViT is logits, so I reconfigured the HEF build to use the preceding layer (/1/head/l/Gemm) as the output node instead, just like CAS-ViT.

However, during inference, I found that the generated HEF file does not use my specified output node. Instead, it continues to expose the original logits layer as the output, unlike what happens with Object Detection models where the output override works as expected. Because of this, the classification inference pipeline feels different and I’m unsure how to properly make it behave like CAS-ViT.

My goal is to replicate CAS-ViT’s behavior so that inference works correctly using the intermediate Gemm output as the classification output.

Could you explain why the EfficientViT HEF still outputs logits instead of the overridden /1/head/l/Gemm layer, and how to correctly run Python inference on a classification HEF built this way? Also, how does classification inference differ from object detection inference in this context?