public class SDRandom extends SDOps
Modifier and Type | Method and Description |
---|---|
SDVariable |
bernoulli(double p,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a Bernoulli distribution,
with the specified probability. |
SDVariable |
bernoulli(String name,
double p,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a Bernoulli distribution,
with the specified probability. |
SDVariable |
binomial(int nTrials,
double p,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a Binomial distribution,
with the specified number of trials and probability. |
SDVariable |
binomial(String name,
int nTrials,
double p,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a Binomial distribution,
with the specified number of trials and probability. |
SDVariable |
exponential(double lambda,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a exponential distribution:
P(x) = lambda * exp(-lambda * x) Inputs must satisfy the following constraints: Must be positive: lambda > 0 |
SDVariable |
exponential(String name,
double lambda,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a exponential distribution:
P(x) = lambda * exp(-lambda * x) Inputs must satisfy the following constraints: Must be positive: lambda > 0 |
SDVariable |
logNormal(double mean,
double stddev,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a Log Normal distribution,
i.e., log(x) ~ N(mean, stdev) |
SDVariable |
logNormal(String name,
double mean,
double stddev,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a Log Normal distribution,
i.e., log(x) ~ N(mean, stdev) |
SDVariable |
normal(double mean,
double stddev,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a Gaussian (normal) distribution,
N(mean, stdev) |
SDVariable |
normal(String name,
double mean,
double stddev,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a Gaussian (normal) distribution,
N(mean, stdev) |
SDVariable |
normalTruncated(double mean,
double stddev,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a Gaussian (normal) distribution,
N(mean, stdev). |
SDVariable |
normalTruncated(String name,
double mean,
double stddev,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a Gaussian (normal) distribution,
N(mean, stdev). |
SDVariable |
uniform(double min,
double max,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a uniform distribution,
U(min,max) |
SDVariable |
uniform(String name,
double min,
double max,
DataType datatype,
long... shape)
Generate a new random INDArray, where values are randomly sampled according to a uniform distribution,
U(min,max) |
public SDRandom(SameDiff sameDiff)
public SDVariable bernoulli(double p, DataType datatype, long... shape)
p
- Probability of value 1datatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable bernoulli(String name, double p, DataType datatype, long... shape)
name
- name May be null. Name for the output variablep
- Probability of value 1datatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable binomial(int nTrials, double p, DataType datatype, long... shape)
nTrials
- Number of trials parameter for the binomial distributionp
- Probability of success for each trialdatatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable binomial(String name, int nTrials, double p, DataType datatype, long... shape)
name
- name May be null. Name for the output variablenTrials
- Number of trials parameter for the binomial distributionp
- Probability of success for each trialdatatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable exponential(double lambda, DataType datatype, long... shape)
lambda
- lambda parameterdatatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable exponential(String name, double lambda, DataType datatype, long... shape)
name
- name May be null. Name for the output variablelambda
- lambda parameterdatatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable logNormal(double mean, double stddev, DataType datatype, long... shape)
log(x) ~ N(mean, stdev)
mean
- Mean value for the random arraystddev
- Standard deviation for the random arraydatatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable logNormal(String name, double mean, double stddev, DataType datatype, long... shape)
log(x) ~ N(mean, stdev)
name
- name May be null. Name for the output variablemean
- Mean value for the random arraystddev
- Standard deviation for the random arraydatatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable normal(double mean, double stddev, DataType datatype, long... shape)
mean
- Mean value for the random arraystddev
- Standard deviation for the random arraydatatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable normal(String name, double mean, double stddev, DataType datatype, long... shape)
name
- name May be null. Name for the output variablemean
- Mean value for the random arraystddev
- Standard deviation for the random arraydatatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable normalTruncated(double mean, double stddev, DataType datatype, long... shape)
mean
- Mean value for the random arraystddev
- Standard deviation for the random arraydatatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable normalTruncated(String name, double mean, double stddev, DataType datatype, long... shape)
name
- name May be null. Name for the output variablemean
- Mean value for the random arraystddev
- Standard deviation for the random arraydatatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable uniform(double min, double max, DataType datatype, long... shape)
min
- Minimum valuemax
- Maximum value.datatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))public SDVariable uniform(String name, double min, double max, DataType datatype, long... shape)
name
- name May be null. Name for the output variablemin
- Minimum valuemax
- Maximum value.datatype
- Data type of the output variableshape
- Shape of the new random INDArray, as a 1D array (Size: AtLeast(min=0))Copyright © 2020. All rights reserved.