mirror of
https://github.com/ultralytics/ultralytics
synced 2026-04-21 14:07:18 +00:00
Check for lrpc attribute before attempting fuse during YOLOE model export (#24239)
Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
1bd9712f6c
commit
5dc005dfaa
1 changed files with 1 additions and 1 deletions
|
|
@ -476,7 +476,7 @@ class Exporter:
|
|||
m.agnostic_nms = self.args.agnostic_nms
|
||||
m.xyxy = self.args.nms and fmt != "coreml"
|
||||
m.shape = None # reset cached shape for new export input size
|
||||
if hasattr(model, "pe") and hasattr(m, "fuse"): # for YOLOE models
|
||||
if hasattr(model, "pe") and hasattr(m, "fuse") and not hasattr(m, "lrpc"): # for YOLOE models
|
||||
m.fuse(model.pe.to(self.device))
|
||||
elif isinstance(m, C2f) and not is_tf_format:
|
||||
# EdgeTPU does not support FlexSplitV while split provides cleaner ONNX graph
|
||||
|
|
|
|||
Loading…
Reference in a new issue