Browse Source

Exposing categorical random

tags/v0.20
Samuel Caldas Haiping 5 years ago
parent
commit
1bfa6a77a6
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, TF_DataType dtype = TF_DataType.TF_FLOAT,
int? seed = null, int? seed = null,
string name = null) => random_ops.random_normal(shape, mean, stddev, dtype, seed, name); 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, public Tensor random_uniform(TensorShape shape,


Loading…
Cancel
Save