jikechao opened a new issue, #16621:
URL: https://github.com/apache/tvm/issues/16621
### Actual behavior
tvm.error.OpAttributeInvalid: Value None in attribute "mode" of operator
Upsample is not valid.
### Environment
Any environment details, such as: Operating System, TVM version, etc
### Steps to reproduce
```
def test_upsample_nearest(target='llvm', dev=tvm.cpu(0)):
"""test_upsample_nearest"""
scale = 2
in_shape = (1, 1, 3, 3)
out_shape = (1, 1, 3 * scale, 3 * scale)
#y = helper.make_node("Upsample", ["in"], ["out"], mode="nearest",
scales=[1.0, 1.0, 2.0, 2.0])
y = helper.make_node("Upsample", ["in"], ["out"], scales=[1.0, 1.0, 2.0,
2.0])
in_array = np.random.uniform(size=in_shape).astype(np.float32)
graph = helper.make_graph(
[y],
"upsample_nearest_test",
inputs=[helper.make_tensor_value_info("in", TensorProto.FLOAT,
list(in_shape))],
outputs=[helper.make_tensor_value_info("out", TensorProto.FLOAT,
list(out_shape))],
)
model = helper.make_model(graph, producer_name="upsample_nearest_test")
verify_with_ort_with_inputs(model, [in_array], [out_shape], opset=7,
target=target, dev=dev)
```
### Triage
* frontend:onnx
* needs-triage
### Analysis
The attribute "mode" in the operator Upsample is an optional attribute with
the default value "nearest".
Thus, the value "None "should be considered as "nearest".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]