diff --git a/tf2onnx/optimizer/einsum_optimizer.py b/tf2onnx/optimizer/einsum_optimizer.py index f689c04ac..48eda026c 100644 --- a/tf2onnx/optimizer/einsum_optimizer.py +++ b/tf2onnx/optimizer/einsum_optimizer.py @@ -2291,8 +2291,6 @@ def _optimize_at_current_graph_level(self, graph): def _optimize_einsum(self, node, graph): """Apply the optimizer.""" - if node.inputs[1].is_const(): - return False inp_shape = graph.get_shape(node.input[0]) if inp_shape is None: # The rank must be known