From e3835b3d1561bb5358335539dc442f72eab80607 Mon Sep 17 00:00:00 2001 From: 9700X_PC <9700X_PC@gmail.com> Date: Sat, 5 Jul 2025 00:04:40 +0900 Subject: [PATCH] . --- re/export.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 re/export.py diff --git a/re/export.py b/re/export.py new file mode 100644 index 0000000..3b0fdc3 --- /dev/null +++ b/re/export.py @@ -0,0 +1,15 @@ +# RETHINED 모델 export.py +import torch +from rethined import RethinedModel # 논문 제공 코드 임포트 + +model = RethinedModel().eval().to('cuda') +H, W = 512, 512 # 또는 원하는 해상도 +dummy = torch.randn(1, 3, H, W, device='cuda') + +torch.onnx.export( + model, dummy, "rethined.onnx", + opset_version=14, + input_names=['input'], + output_names=['output'], + dynamic_axes={'input':{2:'height',3:'width'}, 'output':{2:'height',3:'width'}} +)