tf的公共API。随机名称空间。
从多项分布中抽取样本。(弃用)
- tf.random.multinomial(
- logits,
- num_samples,
- seed=None,
- name=None,
- output_dtype=None
- )
例:
- # samples has shape [1, 5], where each value is either 0 or 1 with equal
- # probability.
- samples = tf.random.categorical(tf.math.log([[10., 10.]]), 5)
参数:
返回值: