# tf.contrib.framework.assign_from_values_fn

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/framework/python/ops/variables.py#L569-L591) |

Returns a function that assigns specific variables from the given values.

    tf.contrib.framework.assign_from_values_fn(
        var_names_to_values
    )

This function provides a mechanism for performing assignment of variables
to values in a way that does not fill the graph with large assignment values.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `var_names_to_values` | A map from variable names to values. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A function that takes a single argument, a [`tf.compat.v1.Session`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/Session), that applies the assignment operation. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if any of the given variable names were not found. |

<br />