|
|
@@ -62,6 +62,19 @@ namespace Tensorflow |
|
|
|
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 uniform(TensorShape shape, |
|
|
|
float minval = 0, |
|
|
|
float maxval = 1, |
|
|
|
TF_DataType dtype = TF_DataType.TF_FLOAT, |
|
|
|
int? seed = null, |
|
|
|
string name = null) |
|
|
|
{ |
|
|
|
if (dtype.is_integer()) |
|
|
|
return random_ops.random_uniform_int(shape, (int)minval, (int)maxval, dtype, seed, name); |
|
|
|
else |
|
|
|
return random_ops.random_uniform(shape, minval, maxval, dtype, seed, name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public Tensor random_uniform(TensorShape shape, |
|
|
@@ -70,16 +83,7 @@ namespace Tensorflow |
|
|
|
TF_DataType dtype = TF_DataType.TF_FLOAT, |
|
|
|
int? seed = null, |
|
|
|
string name = null) |
|
|
|
{ |
|
|
|
if (dtype.is_integer()) |
|
|
|
{ |
|
|
|
return random_ops.random_uniform_int(shape, (int)minval, (int)maxval, dtype, seed, name); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
return random_ops.random_uniform(shape, minval, maxval, dtype, seed, name); |
|
|
|
} |
|
|
|
} |
|
|
|
=> random.uniform(shape, minval: minval, maxval: maxval, dtype: dtype, seed: seed, name: name); |
|
|
|
|
|
|
|
public Tensor truncated_normal(TensorShape shape, |
|
|
|
float mean = 0.0f, |
|
|
|