From e1c976568d408bd2dc071c6f49dad997fec23312 Mon Sep 17 00:00:00 2001 From: YdrMaster Date: Mon, 27 Feb 2023 10:13:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E6=8E=A8=E7=90=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: YdrMaster --- pyinfinitensor/src/pyinfinitensor/onnx.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyinfinitensor/src/pyinfinitensor/onnx.py b/pyinfinitensor/src/pyinfinitensor/onnx.py index 1f6afe19..f85addb4 100644 --- a/pyinfinitensor/src/pyinfinitensor/onnx.py +++ b/pyinfinitensor/src/pyinfinitensor/onnx.py @@ -578,17 +578,17 @@ class OnnxStub: def run(self) -> None: self.handler.run() - def put_int32(self, name: str) -> None: - self.handler.copy_int32(self.inputs[name]) + def put_int32(self, name: str, data: List[int]) -> None: + self.handler.copy_int32(self.inputs[name], data) - def put_int64(self, name: str) -> None: - self.handler.copy_int64(self.inputs[name]) + def put_int64(self, name: str, data: List[int]) -> None: + self.handler.copy_int64(self.inputs[name], data) - def put_float(self, name: str) -> None: - self.handler.copy_float(self.inputs[name]) + def put_float(self, name: str, data: List[int]) -> None: + self.handler.copy_float(self.inputs[name], data) def take_float(self) -> List[float]: - return next(self.handler.outputs.values()).copyFloats() + return next(iter(self.handler.outputs.values())).copyFloats() def from_onnx(model: ModelProto, runtime):