UniformNoiseSampler¶
-
class
tfsnippet.preprocessing.
UniformNoiseSampler
(minval=0.0, maxval=1.0, dtype=None, random_state=None)¶ Bases:
tfsnippet.preprocessing.samplers.BaseSampler
A
DataMapper
which can add uniform noise onto the input array. The data type of the returned array will be the same as the input array, unless dtype is specified at construction.Attributes Summary
dtype
Get the data type of the sampled array. maxval
Get the upper bound of the uniform noise (excluded). minval
Get the lower bound of the uniform noise (included). Methods Summary
__call__
(*arrays)Transform the input arrays into outputs. sample
(x)Sample array according to x. Attributes Documentation
-
dtype
¶ Get the data type of the sampled array.
-
maxval
¶ Get the upper bound of the uniform noise (excluded).
-
minval
¶ Get the lower bound of the uniform noise (included).
Methods Documentation
-
__call__
(*arrays)¶ Transform the input arrays into outputs.
Parameters: *arrays – Arrays to be transformed. Returns: The output arrays. Return type: tuple[np.ndarray]
-
sample
(x)¶ Sample array according to x.
Parameters: x (np.ndarray) – The input x array. Returns: The sampled array. Return type: np.ndarray
-