<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/neural-structured-learning/blob/v1.4.0/neural_structured_learning/tools/graph_utils.py#L78-L106) |

Makes all edges of the given `graph` bi-directional.

#### View aliases


**Main aliases**

[`nsl.tools.graph_utils.add_undirected_edges`](https://www.tensorflow.org/neural_structured_learning/api_docs/python/nsl/tools/add_undirected_edges)

<br />

    nsl.tools.add_undirected_edges(
        graph
    )

Updates `graph` to include a reversed version of each of its edges. Multiple
edges between the same source and target node IDs are combined by picking the
edge with the largest weight.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `graph` | A `dict`: source -\> (target -\> weight) as returned by the `read_tsv_graph` function. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `None`. Instead, this function has a side-effect on the `graph` argument. ||

<br />