ed.to_simplex

Aliases:

  • ed.to_simplex
  • ed.util.to_simplex
to_simplex(x)

Defined in edward/util/tensorflow.py.

Transform real vector of length (K-1) to a simplex of dimension K using a backward stick breaking construction.

Args:

  • x: tf.Tensor. A 1-D or 2-D tensor.

Returns:

tf.Tensor. A tensor of same shape as input but with last dimension of size K.

Raises:

InvalidArgumentError. If the input has Inf or NaN values.

Notes

x as a 3-D or higher tensor is not guaranteed to be supported.