|
|
|
@ -6263,7 +6263,7 @@ def gaussian_random(shape,
|
|
|
|
|
return out
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def sampling_id(x, min=0.0, max=1.0, seed=0):
|
|
|
|
|
def sampling_id(x, min=0.0, max=1.0, seed=0, dtype='float32'):
|
|
|
|
|
"""
|
|
|
|
|
SamplingId Operator.
|
|
|
|
|
|
|
|
|
@ -6276,6 +6276,7 @@ def sampling_id(x, min=0.0, max=1.0, seed=0):
|
|
|
|
|
max (Float): Maximun value of random.
|
|
|
|
|
seed (Float): random seed used for the random number engine.0 means use a seed generated by the system.
|
|
|
|
|
Note that if seed is not 0, this operator will always generate the same random numbers every time.
|
|
|
|
|
dtype(np.dtype|core.VarDesc.VarType|str): The type of output data : float32, float_16, int etc
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
out (Variable): Output of this operator.
|
|
|
|
@ -6283,7 +6284,7 @@ def sampling_id(x, min=0.0, max=1.0, seed=0):
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
helper = LayerHelper('sampling_id', **locals())
|
|
|
|
|
out = helper.create_tmp_variable(dtype=helper.input_dtype('x'))
|
|
|
|
|
out = helper.create_tmp_variable(dtype)
|
|
|
|
|
helper.append_op(
|
|
|
|
|
type='sampling_id',
|
|
|
|
|
inputs={'X': x},
|
|
|
|
@ -6314,7 +6315,7 @@ def gaussian_random_batch_size_like(input,
|
|
|
|
|
mean (Float): The mean (or center) of the gaussian distribution.
|
|
|
|
|
std (Float): The standard deviation (std, or spread) of the gaussian distribution.
|
|
|
|
|
seed (Int): Random seed of generator.0 means use system wide seed._note that if seed is not 0, this operator will always generate the same random numbers every time.
|
|
|
|
|
dtype(np.dtype|core.VarDesc.VarType|str): Output data type.
|
|
|
|
|
dtype(np.dtype|core.VarDesc.VarType|str): The type of output data : float32, float_16, int etc
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
out (Variable): Output of this operator
|
|
|
|
|