tf.contrib.learn.monitors.EveryN.every_n_step_end()

tf.contrib.learn.monitors.EveryN.every_n_step_end(step, outputs) Callback after every n'th step finished. This callback provides access to the tensors/ops evaluated at this step, including the additional tensors for which evaluation was requested in step_begin. In addition, the callback has the opportunity to stop training by returning True. This is useful for early stopping, for example. Args: step: int, the current value of the global step. outputs: dict mapping string values representing

tf.diag()

tf.diag(diagonal, name=None) Returns a diagonal tensor with a given diagonal values. Given a diagonal, this operation returns a tensor with the diagonal and everything else padded with zeros. The diagonal is computed as follows: Assume diagonal has dimensions [D1,..., Dk], then the output is a tensor of rank 2k with dimensions [D1,..., Dk, D1,..., Dk] where: output[i1,..., ik, i1,..., ik] = diagonal[i1, ..., ik] and 0 everywhere else. For example: # 'diagonal' is [1, 2, 3, 4] tf.diag(diagonal)

tf.contrib.layers.optimize_loss()

tf.contrib.layers.optimize_loss(loss, global_step, learning_rate, optimizer, gradient_noise_scale=None, gradient_multipliers=None, clip_gradients=None, learning_rate_decay_fn=None, update_ops=None, variables=None, name=None, summaries=None) Given loss and parameters for optimizer, returns a training op. Various ways of passing optimizers, include: - string, name of the optimizer like 'SGD', 'Adam', see OPTIMIZER_CLS_NAMES for full list. E.g. optimize_loss(..., optimizer='Adam'). - function, ta

tf.contrib.distributions.Dirichlet.dtype

tf.contrib.distributions.Dirichlet.dtype The DType of Tensors handled by this Distribution.

tf.contrib.learn.monitors.NanLoss.step_end()

tf.contrib.learn.monitors.NanLoss.step_end(step, output) Overrides BaseMonitor.step_end. When overriding this method, you must call the super implementation. Args: step: int, the current value of the global step. output: dict mapping string values representing tensor names to the value resulted from running these tensors. Values may be either scalars, for scalar tensors, or Numpy array, for non-scalar tensors. Returns: bool, the result of every_n_step_end, if that was called this step, or

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.distributions.Poisson.allow_nan_stats

tf.contrib.distributions.Poisson.allow_nan_stats Python boolean describing behavior when a stat is undefined. Stats return +/- infinity when it makes sense. E.g., the variance of a Cauchy distribution is infinity. However, sometimes the statistic is undefined, e.g., if a distribution's pdf does not achieve a maximum within the support of the distribution, the mode is undefined. If the mean is undefined, then by definition the variance is undefined. E.g. the mean for Student's T for df = 1 is u

tf.image.extract_glimpse()

tf.image.extract_glimpse(input, size, offsets, centered=None, normalized=None, uniform_noise=None, name=None) Extracts a glimpse from the input tensor. Returns a set of windows called glimpses extracted at location offsets from the input tensor. If the windows only partially overlaps the inputs, the non overlapping areas will be filled with random noise. The result is a 4-D tensor of shape [batch_size, glimpse_height, glimpse_width, channels]. The channels and batch dimensions are the same as

tf.contrib.distributions.GammaWithSoftplusAlphaBeta.name

tf.contrib.distributions.GammaWithSoftplusAlphaBeta.name Name prepended to all ops created by this Distribution.

tf.contrib.distributions.GammaWithSoftplusAlphaBeta.param_static_shapes()

tf.contrib.distributions.GammaWithSoftplusAlphaBeta.param_static_shapes(cls, sample_shape) param_shapes with static (i.e. TensorShape) shapes. Args: sample_shape: TensorShape or python list/tuple. Desired shape of a call to sample(). Returns: dict of parameter name to TensorShape. Raises: ValueError: if sample_shape is a TensorShape and is not fully defined.