From 86ccd7c29eab62fb97f751b849c24b9f66ab4643 Mon Sep 17 00:00:00 2001 From: fly6516 Date: Thu, 29 May 2025 21:06:56 +0800 Subject: [PATCH] =?UTF-8?q?refactor(train):=20=E6=B3=A8=E9=87=8A=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=AF=BC=E5=87=BA=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 注释掉了 opset_version 和 simplify 参数 - 保留了 format 和 dynamic 参数 --- train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index 57d6011..81b6e11 100644 --- a/train.py +++ b/train.py @@ -111,11 +111,11 @@ def main(): # === 模型导出 === print("\n=== 模型导出 ===") model.export( - opset_version=15, + # opset_version=15, format="onnx", # 优先导出ONNX # format="torchscript", dynamic=True, # 动态维度 - simplify=True # 简化模型 + # simplify=True # 简化模型 ) if __name__ == "__main__":