refactor(train): 注释模型导出相关代码
- 注释掉了 opset_version 和 simplify 参数 - 保留了 format 和 dynamic 参数
This commit is contained in:
parent
21d190a658
commit
86ccd7c29e
4
train.py
4
train.py
@ -111,11 +111,11 @@ def main():
|
|||||||
# === 模型导出 ===
|
# === 模型导出 ===
|
||||||
print("\n=== 模型导出 ===")
|
print("\n=== 模型导出 ===")
|
||||||
model.export(
|
model.export(
|
||||||
opset_version=15,
|
# opset_version=15,
|
||||||
format="onnx", # 优先导出ONNX
|
format="onnx", # 优先导出ONNX
|
||||||
# format="torchscript",
|
# format="torchscript",
|
||||||
dynamic=True, # 动态维度
|
dynamic=True, # 动态维度
|
||||||
simplify=True # 简化模型
|
# simplify=True # 简化模型
|
||||||
)
|
)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user