Ejemplo n.º 1
0
 def test_init_random_scale_normal_distribution(self, scale):
     arr = init_random(1000, 1000, scale, distr='normal')
     resulting_scale = np.std(arr.get_value())
     assert np.isclose(scale, resulting_scale, 0.01)
Ejemplo n.º 2
0
 def test_init_random_scale(self, scale):
     arr = init_random(1000, 1000, scale)
     resulting_scale = np.std(arr.get_value())
     assert np.isclose(scale, resulting_scale, 0.01)
Ejemplo n.º 3
0
 def test_init_random_shape(self, shape):
     arr = init_random(shape[0], shape[1])
     resulting_shape = arr.get_value().shape
     assert shape == resulting_shape
Ejemplo n.º 4
0
 def test_init_random_scale_normal_distribution(self, scale):
     arr = init_random(1000, 1000, scale, distr='normal')
     resulting_scale = np.std(arr.get_value())
     assert np.isclose(scale, resulting_scale, 0.01)
Ejemplo n.º 5
0
 def test_init_random_scale(self, scale):
     arr = init_random(1000, 1000, scale)
     resulting_scale = np.std(arr.get_value())
     assert np.isclose(scale, resulting_scale, 0.01)
Ejemplo n.º 6
0
 def test_init_random_shape(self, shape):
     arr = init_random(shape[0], shape[1])
     resulting_shape = arr.get_value().shape
     assert shape == resulting_shape