diff --git a/python/tvm/relay/frontend/onnx.py b/python/tvm/relay/frontend/onnx.py index 1e5dad46782c..58c2dbcad26a 100644 --- a/python/tvm/relay/frontend/onnx.py +++ b/python/tvm/relay/frontend/onnx.py @@ -1753,7 +1753,7 @@ def _impl_v7(cls, inputs, attr, params): P = inputs[7] num_directions = infer_shape(W)[0] - W_dtype = infer_type(W).type_annotation.dtype + W_dtype = infer_type(W).checked_type.dtype if num_directions != 1: raise NotImplementedError("Bidirectional LSTMs not yet supported.") @@ -1865,7 +1865,7 @@ def _impl_v7(cls, inputs, attr, params): linear_before_reset = attr.get("linear_before_reset", 0) num_directions = infer_shape(W)[0] - W_dtype = infer_type(W).type_annotation.dtype + W_dtype = infer_type(W).checked_type.dtype if num_directions != 1: raise NotImplementedError("Bidirectional GRUs not yet supported.")