[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tf.compat.v1.local_variables_initializer\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.16.1/tensorflow/python/ops/variables.py#L1924-L1940) |\n\nReturns an Op that initializes all local variables.\n\n#### View aliases\n\n\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.local_variables`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/local_variables_initializer)\n\n\u003cbr /\u003e\n\n tf.compat.v1.local_variables_initializer()\n\n\u003cbr /\u003e\n\nMigrate to TF2\n--------------\n\n\u003cbr /\u003e\n\n| **Caution:** This API was designed for TensorFlow v1. Continue reading for details on how to migrate from this API to a native TensorFlow v2 equivalent. See the [TensorFlow v1 to TensorFlow v2 migration guide](https://www.tensorflow.org/guide/migrate) for instructions on how to migrate the rest of your code.\n\nIn TF2, variables are initialized immediately when they are created. There is\nno longer a need to run variable initializers before using them.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nDescription\n-----------\n\nThis is just a shortcut for `variables_initializer(local_variables())`\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| An Op that initializes all local variables in the graph. ||\n\n\u003cbr /\u003e"]]