Fix export using Trainer

This commit is contained in:
henryruhs
2025-03-11 14:43:10 +01:00
parent cadbe9cf76
commit 84b4451366
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -20,5 +20,5 @@ def export() -> None:
model = EmbeddingConverterTrainer.load_from_checkpoint(source_path, map_location = 'cpu')
model.eval()
model.ir_version = torch.tensor(ir_version)
input_tensor = (torch.randn(1, 512), )
input_tensor = torch.randn(1, 512)
torch.onnx.export(model, input_tensor, target_path, input_names = [ 'input' ], output_names = [ 'output' ], opset_version = opset_version)