tf.contrib.framework.get_graph_from_inputs()

tf.contrib.framework.get_graph_from_inputs(op_input_list, graph=None) Returns the appropriate graph to use for the given inputs. If graph is provided, we validate that all inputs in op_input_list are from the same graph. Otherwise, we attempt to select a graph from the first Operation- or Tensor-valued input in op_input_list, and validate that all other such inputs are in the same graph. If the graph was not specified and it could not be inferred from op_input_list, we attempt to use the defau

tf.contrib.framework.get_global_step()

tf.contrib.framework.get_global_step(graph=None) Get the global step tensor. The global step tensor must be an integer variable. We first try to find it in the collection GLOBAL_STEP, or by name global_step:0. Args: graph: The graph to find the global step in. If missing, use default graph. Returns: The global step variable, or None if none was found. Raises: TypeError: If the global step tensor has a non-integer type, or if it is not a Variable.

tf.contrib.framework.deprecated_arg_values()

tf.contrib.framework.deprecated_arg_values(date, instructions, **deprecated_kwargs) Decorator for marking specific function argument values as deprecated. This decorator logs a deprecation warning whenever the decorated function is called with the deprecated argument values. It has the following format: Calling (from ) with = is deprecated and will be removed after . Instructions for updating: will include the class name if it is a method. It also edits the docstring of the function: ' (dep

tf.contrib.framework.deprecated_args()

tf.contrib.framework.deprecated_args(date, instructions, *deprecated_arg_names) Decorator for marking specific function arguments as deprecated. This decorator logs a deprecation warning whenever the decorated function is called with the deprecated argument. It has the following format: Calling (from ) with is deprecated and will be removed after . Instructions for updating: will include the class name if it is a method. It also edits the docstring of the function: ' (deprecated arguments)

tf.contrib.framework.deprecated()

tf.contrib.framework.deprecated(date, instructions) Decorator for marking functions or methods deprecated. This decorator logs a deprecation warning whenever the decorated function is called. It has the following format: (from ) is deprecated and will be removed after . Instructions for updating: will include the class name if it is a method. It also edits the docstring of the function: ' (deprecated)' is appended to the first line of the docstring and a deprecation notice is prepended to t

tf.contrib.framework.create_global_step()

tf.contrib.framework.create_global_step(graph=None) Create global step tensor in graph. Args: graph: The graph in which to create the global step. If missing, use default graph. Returns: Global step tensor. Raises: ValueError: if global step key is already defined.

tf.contrib.framework.convert_to_tensor_or_sparse_tensor()

tf.contrib.framework.convert_to_tensor_or_sparse_tensor(value, dtype=None, name=None, as_ref=False) Converts value to a SparseTensor or Tensor. Args: value: A SparseTensor, SparseTensorValue, or an object whose type has a registered Tensor conversion function. dtype: Optional element type for the returned tensor. If missing, the type is inferred from the type of value. name: Optional name to use if a new Tensor is created. as_ref: True if we want the result as a ref tensor. Only used if a

tf.contrib.framework.assign_from_values_fn()

tf.contrib.framework.assign_from_values_fn(var_names_to_values) 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 giv

tf.contrib.framework.assign_from_values()

tf.contrib.framework.assign_from_values(var_names_to_values) Creates an assignment operation from a given mapping. 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: assign_op: An Operation that assigns each of the given variables to the requested values. feed_dict: The feed dictionary to use when evaluating assign_op

tf.contrib.framework.assign_from_checkpoint_fn()

tf.contrib.framework.assign_from_checkpoint_fn(model_path, var_list, ignore_missing_vars=False, reshape_variables=False) Returns a function that assigns specific variables from a checkpoint. Args: model_path: The full path to the model checkpoint. To get latest checkpoint use model_path = tf.train.latest_checkpoint(checkpoint_dir) var_list: A list of Variable objects or a dictionary mapping names in the checkpoint to the correspoing variables to initialize. If empty or None, it would return