tf.initializers.variables
Stay organized with collections
Save and categorize content based on your preferences.
Returns an Op that initializes a list of variables.
tf.initializers.variables(
var_list, name='init'
)
After you launch the graph in a session, you can run the returned Op to
initialize all the variables in var_list
. This Op runs all the
initializers of the variables in var_list
in parallel.
Calling initialize_variables()
is equivalent to passing the list of
initializers to Group()
.
If var_list
is empty, however, the function still returns an Op that can
be run. That Op just has no effect.
Args |
var_list
|
List of Variable objects to initialize.
|
name
|
Optional name for the returned operation.
|
Returns |
An Op that run the initializers of all the specified variables.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.initializers.variables\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/variables.py#L3195-L3218) |\n\nReturns an Op that initializes a list of variables.\n\n#### View aliases\n\n\n**Main aliases**\n\n\\`tf.variables_initializer\\`\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.initializers.variables`](/api_docs/python/tf/compat/v1/variables_initializer), [`tf.compat.v1.variables_initializer`](/api_docs/python/tf/compat/v1/variables_initializer)\n\n\u003cbr /\u003e\n\n tf.initializers.variables(\n var_list, name='init'\n )\n\nAfter you launch the graph in a session, you can run the returned Op to\ninitialize all the variables in `var_list`. This Op runs all the\ninitializers of the variables in `var_list` in parallel.\n\nCalling `initialize_variables()` is equivalent to passing the list of\ninitializers to `Group()`.\n\nIf `var_list` is empty, however, the function still returns an Op that can\nbe run. That Op just has no effect.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------|-------------------------------------------|\n| `var_list` | List of `Variable` objects to initialize. |\n| `name` | Optional name for the returned operation. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| An Op that run the initializers of all the specified variables. ||\n\n\u003cbr /\u003e"]]