当前位置: 首页 > 文档资料 > Edward 中文文档 >

ed.to_simplex

优质
小牛编辑
123浏览
2023-12-01

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.