You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to generate a graph utilizing a RandomUniform node with an input data type of float16, and attempted to conduct inference using the ONNX API. However, when invoking the onnxruntime.InferenceSession, I encountered a NotImplemented error. The relevant code snippet is provided below.
Further information
Version of onnx: 1.15.0
Version of onnxruntime: 1.16.1
Relevant Area: model usage, operators, IR
Is this issue related to a specific model?
No
Notes
importonnxfromonnximporthelperfromonnximportTensorProtoimportonnxruntime# The protobuf definition can be found here:# https://github.com/onnx/onnx/blob/master/onnx/onnx.protodtype=TensorProto.FLOAT16# Create one output (ValueInfoProto)Y1=helper.make_tensor_value_info('Y1', dtype, [3, 4])
# Create a node (NodeProto) - This is based on Pad-11random_uniform_node=helper.make_node(
'RandomUniform', # node name
[], # inputs
['Y1'], # outputsname="random_uniform_node",
dtype=dtype,
high=1.0,
low=0.0,
seed=0.5,
shape=[3, 4] # attributes
)
print(random_uniform_node)
# Create the graph (GraphProto)graph_def=helper.make_graph(
[random_uniform_node],
'test-model',
[],
[Y1],
)
# Create the model (ModelProto)model_def=helper.make_model(graph_def, producer_name='onnx-example')
print('The model is:\n{}'.format(model_def))
onnx.checker.check_model(model_def)
print('The model is checked!')
onnx.save(model_def, 'random_uniform.onnx')
sess=onnxruntime.InferenceSession('random_uniform.onnx')
output=sess.run(['Y1'], {})[0]
print(Y1)
print(output)
error shown as:
NotImplemented: [ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for RandomUniform(1) node with name 'random_uniform_node'
The text was updated successfully, but these errors were encountered:
Describe the feature request
https://onnx.ai/onnx/operators/onnx__RandomUniformLike.html#l-onnx-doc-randomuniformlike
☝️ as document said, Onnx RandomUniform op should support float16 dtype.
Describe scenario use case
Question
I attempted to generate a graph utilizing a RandomUniform node with an input data type of float16, and attempted to conduct inference using the ONNX API. However, when invoking the onnxruntime.InferenceSession, I encountered a NotImplemented error. The relevant code snippet is provided below.
Further information
Version of onnx: 1.15.0
Version of onnxruntime: 1.16.1
Relevant Area: model usage, operators, IR
Is this issue related to a specific model?
No
Notes
error shown as:
The text was updated successfully, but these errors were encountered: