neupy.init.Uniform

class neupy.init.Uniform[source]

Initialize parameter sampling from the uniform distribution.

Parameters:
minval : int, float

Minimum possible value.

maxval : int, float

Maximum possible value.

seed : None or int

Random seed. Integer value will make results reproducible. Defaults to None.

Methods

sample(shape, return_array=False) Returns tensorflow’s tensor or numpy array with specified shape. Type of the object depends on the return_array value. Numpy array will be returned when return_array=True and tensor otherwise.
sample(shape, return_array=False)[source]

Returns tensorflow’s tensor with specified shape.

Parameters:
shape : tuple

Parameter shape.

return_array : bool

Returns numpy’s array when equal to True and tensorflow’s tensor when equal to False. Defaults to False.

Returns:
array-like or Tensor