tf.contrib.framework.assign_from_checkpoint()

tf.contrib.framework.assign_from_checkpoint(model_path, var_list) Creates an operation to assign 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 no_op(), None. Returns: the restore_op and the feed_d

tf.contrib.framework.assert_scalar_int()

tf.contrib.framework.assert_scalar_int(tensor) Assert tensor is 0-D, of type tf.int32 or tf.int64. Args: tensor: Tensor to test. Returns: tensor, for chaining. Raises: ValueError: if tensor is not 0-D, of type tf.int32 or tf.int64.

tf.contrib.framework.assert_same_float_dtype()

tf.contrib.framework.assert_same_float_dtype(tensors=None, dtype=None) Validate and return float type based on tensors and dtype. For ops such as matrix multiplication, inputs and weights must be of the same float type. This function validates that all tensors are the same type, validates that type is dtype (if supplied), and returns the type. Type must be dtypes.float32 or dtypes.float64. If neither tensors nor dtype is supplied, default to dtypes.float32. Args: tensors: Tensors of input val

tf.contrib.framework.assert_or_get_global_step()

tf.contrib.framework.assert_or_get_global_step(graph=None, global_step_tensor=None) Verifies that a global step tensor is valid or gets one if None is given. If global_step_tensor is not None, check that it is a valid global step tensor (using assert_global_step). Otherwise find a global step tensor using get_global_step and return it. Args: graph: The graph to find the global step tensor for. global_step_tensor: The tensor to check for suitability as a global step. If None is given (the def

tf.contrib.framework.assert_global_step()

tf.contrib.framework.assert_global_step(global_step_tensor) Asserts global_step_tensor is a scalar int Variable or Tensor. Args: global_step_tensor: Tensor to test.

tf.contrib.framework.arg_scoped_arguments()

tf.contrib.framework.arg_scoped_arguments(func) Returns the list kwargs that arg_scope can set for a func. Args: func: function which has been decorated with @add_arg_scope. Returns: a list of kwargs names.

tf.contrib.framework.arg_scope()

tf.contrib.framework.arg_scope(list_ops_or_scope, **kwargs) Stores the default arguments for the given set of list_ops. For usage, please see examples at top of the file. Args: list_ops_or_scope: List or tuple of operations to set argument scope for or a dictionary containg the current scope. When list_ops_or_scope is a dict, kwargs must be empty. When list_ops_or_scope is a list or tuple, then every op in it need to be decorated with @add_arg_scope to work. **kwargs: keyword=value that will

tf.contrib.framework.add_model_variable()

tf.contrib.framework.add_model_variable(var) Adds a variable to the GraphKeys.MODEL_VARIABLES collection. Args: var: a variable.

tf.contrib.framework.add_arg_scope()

tf.contrib.framework.add_arg_scope(func) Decorates a function with args so it can be used within an arg_scope. Args: func: function to decorate. Returns: A tuple with the decorated function func_with_args().

tf.contrib.ffmpeg.encode_audio()

tf.contrib.ffmpeg.encode_audio(audio, file_format=None, samples_per_second=None) Creates an op that encodes an audio file using sampled audio from a tensor. Args: audio: A rank 2 tensor that has time along dimension 0 and channels along dimension 1. Dimension 0 is samples_per_second * length long in seconds. file_format: The type of file to encode. "wav" is the only supported format. samples_per_second: The number of samples in the audio tensor per second of audio. Returns: A scalar tenso