Browse Source

Exposing categorical random

pull/549/head
Samuel Caldas 5 years ago
parent
commit
56928f049b
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/TensorFlowNET.Core/APIs/tf.random.cs

+ 6
- 0
src/TensorFlowNET.Core/APIs/tf.random.cs View File

@@ -38,6 +38,12 @@ namespace Tensorflow
TF_DataType dtype = TF_DataType.TF_FLOAT,
int? seed = null,
string name = null) => random_ops.random_normal(shape, mean, stddev, dtype, seed, name);
public Tensor categorical(
Tensor logits,
int num_samples,
int? seed = null,
string name = null,
TF_DataType output_dtype = TF_DataType.DtInvalid) => random_ops.multinomial(logits, num_samples, seed: seed, name: name, output_dtype: output_dtype);
}

public Tensor random_uniform(TensorShape shape,


Loading…
Cancel
Save