tf.square()

tf.square(x, name=None) Computes square of x element-wise. I.e., (y = x * x = x^2). Args: x: A Tensor or SparseTensor. Must be one of the following types: half, float32, float64, int32, int64, complex64, complex128. name: A name for the operation (optional). Returns: A Tensor or SparseTensor. Has the same type as x.

tf.sparse_placeholder()

tf.sparse_placeholder(dtype, shape=None, name=None) Inserts a placeholder for a sparse tensor that will be always fed. Important: This sparse tensor will produce an error if evaluated. Its value must be fed using the feed_dict optional argument to Session.run(), Tensor.eval(), or Operation.run(). For example: x = tf.sparse_placeholder(tf.float32) y = tf.sparse_reduce_sum(x) with tf.Session() as sess: print(sess.run(y)) # ERROR: will fail because x was not fed. indices = np.array([[3, 2,

tf.contrib.distributions.DirichletMultinomial.variance()

tf.contrib.distributions.DirichletMultinomial.variance(name='variance') Variance. Additional documentation from DirichletMultinomial: The variance for each batch member is defined as the following: Var(X_j) = n * alpha_j / alpha_0 * (1 - alpha_j / alpha_0) * (n + alpha_0) / (1 + alpha_0) where alpha_0 = sum_j alpha_j. The covariance between elements in a batch is defined as: Cov(X_i, X_j) = -n * alpha_i * alpha_j / alpha_0 ** 2 * (n + alpha_0) / (1 + alpha_0)

tf.contrib.learn.DNNRegressor.__init__()

tf.contrib.learn.DNNRegressor.__init__(hidden_units, feature_columns, model_dir=None, weight_column_name=None, optimizer=None, activation_fn=relu, dropout=None, gradient_clip_norm=None, enable_centered_bias=None, config=None) Initializes a DNNRegressor instance. Args: hidden_units: List of hidden units per layer. All layers are fully connected. Ex. [64, 32] means first layer has 64 nodes and second one has 32. feature_columns: An iterable containing all the feature columns used by the model.

tf.contrib.distributions.Dirichlet.log_cdf()

tf.contrib.distributions.Dirichlet.log_cdf(value, name='log_cdf') Log cumulative distribution function. Given random variable X, the cumulative distribution function cdf is: log_cdf(x) := Log[ P[X <= x] ] Often, a numerical approximation can be used for log_cdf(x) that yields a more accurate answer than simply taking the logarithm of the cdf when x << -1. Args: value: float or double Tensor. name: The name to give this op. Returns: logcdf: a Tensor of shape sample_shape(x) + sel

tf.contrib.distributions.BernoulliWithSigmoidP

class tf.contrib.distributions.BernoulliWithSigmoidP Bernoulli with p = sigmoid(p).

tf.contrib.distributions.Dirichlet.log_survival_function()

tf.contrib.distributions.Dirichlet.log_survival_function(value, name='log_survival_function') Log survival function. Given random variable X, the survival function is defined: log_survival_function(x) = Log[ P[X > x] ] = Log[ 1 - P[X <= x] ] = Log[ 1 - cdf(x) ] Typically, different numerical approximations can be used for the log survival function, which are more accurate than 1 - cdf(x) when x >> 1. Args: value: float or double T

tf.contrib.distributions.Bernoulli.sample_n()

tf.contrib.distributions.Bernoulli.sample_n(n, seed=None, name='sample_n') Generate n samples. Args: n: Scalar Tensor of type int32 or int64, the number of observations to sample. seed: Python integer seed for RNG name: name to give to the op. Returns: samples: a Tensor with a prepended dimension (n,). Raises: TypeError: if n is not an integer type.

tf.contrib.bayesflow.stochastic_tensor.PoissonTensor.input_dict

tf.contrib.bayesflow.stochastic_tensor.PoissonTensor.input_dict

tf.contrib.distributions.BernoulliWithSigmoidP.param_static_shapes()

tf.contrib.distributions.BernoulliWithSigmoidP.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.