jikechao opened a new issue, #14621: URL: https://github.com/apache/tvm/issues/14621
As we can see in the [ONNX official documentation](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Dropout) seed is an optional input. However, Relay only supports rate attr and doesn't support the `seed` as an attr yet, which could lead to a crash. You can see the code in file [src/relay/op/nn/nn.cc](https://github.com/apache/tvm/blob/main/src/relay/op/nn/nn.cc#:~:text=attrs%20%3D%20make_object%3CDropoutAttrs%3E()%3B-,attrs%2D%3Erate%20%3D%20rate%3B,-static%20const%20Op) Crash message: ``` Traceback (most recent call last): .... irmod, params = relay.frontend.from_onnx(model, {'x': (3, 4, 5)}, freeze_params=True) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 7346, in from_onnx mod, params = g.from_onnx(graph, opset) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 6963, in from_onnx self._construct_nodes(graph) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 7078, in _construct_nodes op = self._convert_operator(op_name, inputs, attr, self.opset) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 7204, in _convert_operator sym = convert_map[op_name](inputs, attrs, self._params) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/common.py", line 453, in __call__ return get_relay_op(op_name)(*inputs, **new_attrs) TypeError: dropout() got an unexpected keyword argument 'seed' ``` ### Triage * relay:op -- 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]
