diff --git a/python/tvm/relay/frontend/keras.py b/python/tvm/relay/frontend/keras.py index 6821bd8f5f2de..dc0e5d394d1d6 100644 --- a/python/tvm/relay/frontend/keras.py +++ b/python/tvm/relay/frontend/keras.py @@ -1205,12 +1205,12 @@ def _convert_layer(keras_layer, etab, scope=""): name = outname + ":" + str(t_idx) etab.set_expr(name, out) return outs - else: - if len(inexpr) == 1: - inexpr = inexpr[0] - return keras_op_to_relay( - inexpr, keras_layer, scope + keras_layer.name + ":" + str(node_idx), etab - ) + + if len(inexpr) == 1: + inexpr = inexpr[0] + return keras_op_to_relay( + inexpr, keras_layer, scope + keras_layer.name + ":" + str(node_idx), etab + ) is_tf_keras = _check_model_is_tf_keras()