<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#L109-L133) |

Reads the file `filename` containing graph edges in TSV format.

#### View aliases


**Main aliases**

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

<br />

    nsl.tools.read_tsv_graph(
        filename
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `filename` | Name of a TSV file specifying the edges of a graph. Each line of the input file should be the specification of a single graph edge in the form `source\<TAB\>target[\<TAB\>weight]`. If supplied, `weight` should be a floating point number; if not supplied, it defaults to 1.0. Multiple edges between the same source and target node IDs are combined by picking the edge with the largest weight. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A graph represented as a `dict`: source -\> (target -\> weight). ||

<br />