From 123cb82334d809987bad17ca59e5736d1a65422b Mon Sep 17 00:00:00 2001 From: Liyu Xiao Date: Thu, 22 May 2025 15:08:31 -0400 Subject: [PATCH] removed fp16, fp32 from the file names --- convert_to_onnx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/convert_to_onnx.py b/convert_to_onnx.py index 4616290..ab21541 100644 --- a/convert_to_onnx.py +++ b/convert_to_onnx.py @@ -48,12 +48,12 @@ def convert_to_onnx(ckpt_path, fp16=False): # Generate random sample data base, ext = os.path.splitext(os.path.basename(ckpt_path)) if fp16: - output_path = os.path.join(ONNX_DIR, f"{base}_fp16.onnx") + output_path = os.path.join(ONNX_DIR, f"{base}.onnx") sample_input = torch.from_numpy( np.random.rand(batch_size, in_channels, slice_length).astype(np.float16) ) else: - output_path = os.path.join(ONNX_DIR, f"{base}_fp32.onnx") + output_path = os.path.join(ONNX_DIR, f"{base}.onnx") sample_input = torch.rand(batch_size, in_channels, slice_length) torch.onnx.export(