tf.contrib.framework.assign_from_values_fn

tf.contrib.framework.assign_from_values_fn(var_names_to_values)

Defined in tensorflow/contrib/framework/python/ops/variables.py.

Returns a function that assigns specific variables from the given 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.

Args:

  • var_names_to_values: A map from variable names to values.

Returns:

A function that takes a single argument, a tf.Session, that applies the assignment operation.

Raises:

  • ValueError: if any of the given variable names were not found.
{"cc_re__cc_re__cc_by_3_0": [">\n\n<p>A function that takes a single argument, a <a href=\"https://tensorflow.google.cn/api_docs/python/tf/Session\"><code>tf.Session</code></a>, that applies the\nassignment operation.</p>\n\n<h4 id=\"raises\">Raises:</h4>\n\n<ul>\n<li><b><code>ValueError</code></b>: if any of the given variable names were not found.</li>\n</ul>\n\n  </div>\n  \n\n  \n        \n  \n\n\n\n\n\n\n\n        \n<div class=\"devsite-content-footer nocontent\">\n  \n  \n    <p>Except as otherwise noted, the content of this page is licensed under the <a href=\"https://creativecommons.org/licenses/by/3.0/\">Creative Commons Attribution 3.0 License</a>, and code samples are licensed under the <a href=\"https://www.apache.org/licenses/LICENSE-2.0\">Apache 2.0 License</a>. For details, see our <a href=\"https://developers.google.cn/terms/site-policies\">Site Policies</a>. Java is a registered trademark of Oracle and/or its affiliates.</p>\n  \n\n  \n    \n    <p class=\"devsite-content-footer-date\" itemprop=\"datePublished\"\n       content=\"2018-11-20T02:13:52.310702\">\n      \n      \u4e0a\u6b21\u66f4\u65b0\u65e5\u671f\uff1a\u5341\u4e00\u6708 "]}