ensure_variables_initialized

tfsnippet.utils.ensure_variables_initialized(variables=None, name=None)

Ensure variables are initialized.

Parameters:
  • variables (list[tf.Variable] or dict[str, tf.Variable]) – Ensure only the variables within this collection to be initialized. If not specified, will ensure all variables within the collection tf.GraphKeys.GLOBAL_VARIABLES to be initialized.
  • name (str) – TensorFlow name scope of the graph nodes. (default ensure_variables_initialized)