onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

Type Error: Type 'tensor(int64)' of input parameter (16586) of operator (Clip) in node (Clip_13292) is invalid.

Open lix19937 opened this issue 9 months ago • 4 comments

Describe the issue

Use ort to infer, then raise error:

Type Error: Type 'tensor(int64)' of input parameter (16586) of operator (Clip) in node (Clip_13292) is invalid.

To reproduce

onnx                      1.15.0
onnx-graphsurgeon         0.3.21
onnx-simplifier           0.4.36
onnxruntime               1.17.1

Urgency

No response

Platform

Linux

OS Version

ubuntu20.04

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

1.15.0

ONNX Runtime API

Python

Architecture

X64

Execution Provider

Default CPU

Execution Provider Library Version

No response

lix19937 avatar May 14 '24 04:05 lix19937

onnxruntime not support torch.clamp ?

lix19937 avatar May 14 '24 04:05 lix19937

https://github.com/microsoft/onnxruntime/issues/10399#issuecomment-1024588996
https://github.com/microsoft/onnxruntime/issues/15167#issuecomment-1480631287

lix19937 avatar May 14 '24 05:05 lix19937

Clip should be supported with int64 input. https://github.com/microsoft/onnxruntime/blob/v1.17.1/docs/OperatorKernels.md#cpuexecutionprovider

What ONNX opset version is the model using?

edgchen1 avatar May 16 '24 23:05 edgchen1

What ONNX opset version is the model using?

opset_version in torch.onnx.export is 11, when I update to 13, no error.

lix19937 avatar May 17 '24 01:05 lix19937