/third_party/mindspore/tests/ut/python/nn/probability/distribution/ |
D | test_categorical.py | 22 import mindspore.nn.probability.distribution as msd namespace 31 c = msd.Categorical() 32 assert isinstance(c, msd.Distribution) 33 c = msd.Categorical([0.1, 0.9], dtype=dtype.int32) 34 assert isinstance(c, msd.Distribution) 39 msd.Categorical([0.1], dtype=dtype.bool_) 44 msd.Categorical([0.1], name=1.0) 49 msd.Categorical([0.1], seed='seed') 57 msd.Categorical([-0.1], dtype=dtype.int32) 59 msd.Categorical([1.1], dtype=dtype.int32) [all …]
|
D | test_beta.py | 22 import mindspore.nn.probability.distribution as msd namespace 31 msd.Gamma([[2.], [1.]], [[2.], [3.], [4.]], dtype=dtype.float32) 35 msd.Gamma([0.], [1.], dtype=dtype.int32) 39 msd.Gamma([0.], [1.], name=1.0) 43 msd.Gamma([0.], [1.], seed='seed') 47 msd.Gamma([0.], [1.]) 49 msd.Gamma([-1.], [1.]) 53 msd.Gamma([1.], [0.]) 55 msd.Gamma([1.], [-1.]) 59 msd.Gamma(3., [4.]) [all …]
|
D | test_bernoulli.py | 21 import mindspore.nn.probability.distribution as msd namespace 30 b = msd.Bernoulli() 31 assert isinstance(b, msd.Distribution) 32 b = msd.Bernoulli([0.1, 0.3, 0.5, 0.9], dtype=dtype.int32) 33 assert isinstance(b, msd.Distribution) 38 msd.Bernoulli([0.1], dtype=dtype.bool_) 43 msd.Bernoulli([0.1], name=1.0) 48 msd.Bernoulli([0.1], seed='seed') 56 msd.Bernoulli([-0.1], dtype=dtype.int32) 58 msd.Bernoulli([1.1], dtype=dtype.int32) [all …]
|
D | test_geometric.py | 21 import mindspore.nn.probability.distribution as msd namespace 30 g = msd.Geometric() 31 assert isinstance(g, msd.Distribution) 32 g = msd.Geometric([0.1, 0.3, 0.5, 0.9], dtype=dtype.int32) 33 assert isinstance(g, msd.Distribution) 38 msd.Geometric([0.1], dtype=dtype.bool_) 43 msd.Geometric([0.1], name=1.0) 48 msd.Geometric([0.1], seed='seed') 56 msd.Geometric([-0.1], dtype=dtype.int32) 58 msd.Geometric([1.1], dtype=dtype.int32) [all …]
|
D | test_poisson.py | 21 import mindspore.nn.probability.distribution as msd namespace 30 p = msd.Poisson() 31 assert isinstance(p, msd.Distribution) 32 p = msd.Poisson([0.1, 0.3, 0.5, 1.0], dtype=dtype.float32) 33 assert isinstance(p, msd.Distribution) 37 msd.Poisson([0.1], dtype=dtype.bool_) 41 msd.Poisson([0.1], name=1.0) 45 msd.Poisson([0.1], seed='seed') 52 msd.Poisson([-0.1], dtype=dtype.float32) 54 msd.Poisson([0.0], dtype=dtype.float32) [all …]
|
D | test_gamma.py | 22 import mindspore.nn.probability.distribution as msd namespace 31 msd.Gamma([[2.], [1.]], [[2.], [3.], [4.]], dtype=dtype.float32) 35 msd.Gamma([0.], [1.], dtype=dtype.int32) 39 msd.Gamma([0.], [1.], name=1.0) 43 msd.Gamma([0.], [1.], seed='seed') 47 msd.Gamma([0.], [0.]) 49 msd.Gamma([0.], [-1.]) 53 msd.Gamma(3., [4.]) 55 msd.Gamma([3.], -4.) 61 g = msd.Gamma() [all …]
|
D | test_cauchy.py | 21 import mindspore.nn.probability.distribution as msd namespace 30 msd.Cauchy([[2.], [1.]], [[2.], [3.], [4.]], dtype=dtype.float32) 34 msd.Cauchy(0., 1., dtype=dtype.int32) 38 msd.Cauchy(0., 1., name=1.0) 42 msd.Cauchy(0., 1., seed='seed') 46 msd.Cauchy(0., 0.) 48 msd.Cauchy(0., -1.) 54 l = msd.Cauchy() 55 assert isinstance(l, msd.Distribution) 56 l = msd.Cauchy([3.0], [4.0], dtype=dtype.float32) [all …]
|
D | test_exponential.py | 21 import mindspore.nn.probability.distribution as msd namespace 30 e = msd.Exponential() 31 assert isinstance(e, msd.Distribution) 32 e = msd.Exponential([0.1, 0.3, 0.5, 1.0], dtype=dtype.float32) 33 assert isinstance(e, msd.Distribution) 37 msd.Exponential([0.1], dtype=dtype.int32) 41 msd.Exponential([0.1], name=1.0) 45 msd.Exponential([0.1], seed='seed') 52 msd.Exponential([-0.1], dtype=dtype.float32) 54 msd.Exponential([0.0], dtype=dtype.float32) [all …]
|
D | test_logistic.py | 21 import mindspore.nn.probability.distribution as msd namespace 30 msd.Logistic([[2.], [1.]], [[2.], [3.], [4.]], dtype=dtype.float32) 34 msd.Logistic(0., 1., dtype=dtype.int32) 38 msd.Logistic(0., 1., name=1.0) 42 msd.Logistic(0., 1., seed='seed') 46 msd.Logistic(0., 0.) 48 msd.Logistic(0., -1.) 54 l = msd.Logistic() 55 assert isinstance(l, msd.Distribution) 56 l = msd.Logistic([3.0], [4.0], dtype=dtype.float32) [all …]
|
D | test_uniform.py | 22 import mindspore.nn.probability.distribution as msd namespace 32 msd.Uniform([[2.], [1.]], [[2.], [3.], [4.]], dtype=dtype.float32) 37 msd.Uniform(0., 1., dtype=dtype.int32) 42 msd.Uniform(0., 1., name=1.0) 47 msd.Uniform(0., 1., seed='seed') 54 u = msd.Uniform() 55 assert isinstance(u, msd.Distribution) 56 u = msd.Uniform([3.0], [4.0], dtype=dtype.float32) 57 assert isinstance(u, msd.Distribution) 65 msd.Uniform(0.0, 0.0, dtype=dtype.float32) [all …]
|
D | test_lognormal.py | 22 import mindspore.nn.probability.distribution as msd namespace 31 msd.LogNormal([[2.], [1.]], [[2.], [3.], [4.]], dtype=dtype.float32) 35 msd.LogNormal(0., 1., dtype=dtype.int32) 39 msd.LogNormal(0., 1., name=1.0) 43 msd.LogNormal(0., 1., seed='seed') 47 msd.LogNormal(0., 0.) 49 msd.LogNormal(0., -1.) 55 n = msd.LogNormal() 56 assert isinstance(n, msd.Distribution) 57 n = msd.LogNormal([3.0], [4.0], dtype=dtype.float32) [all …]
|
D | test_normal.py | 22 import mindspore.nn.probability.distribution as msd namespace 31 msd.Normal([[2.], [1.]], [[2.], [3.], [4.]], dtype=dtype.float32) 35 msd.Normal(0., 1., dtype=dtype.int32) 39 msd.Normal(0., 1., name=1.0) 43 msd.Normal(0., 1., seed='seed') 47 msd.Normal(0., 0.) 49 msd.Normal(0., -1.) 55 n = msd.Normal() 56 assert isinstance(n, msd.Distribution) 57 n = msd.Normal([3.0], [4.0], dtype=dtype.float32) [all …]
|
/third_party/mindspore/tests/st/probability/distribution/ |
D | test_categorical.py | 21 import mindspore.nn.probability.distribution as msd namespace 35 self.c = msd.Categorical([0.7, 0.3], dtype=dtype.int32) 61 self.c = msd.Categorical([0.7, 0.3], dtype=dtype.int32) 87 self.c = msd.Categorical([0.7, 0.3], dtype=dtype.int32) 110 self.c = msd.Categorical([0.2, 0.1, 0.7], dtype=dtype.int32) 133 self.c = msd.Categorical([0.2, 0.1, 0.7], dtype=dtype.int32) 161 self.c = msd.Categorical([0.7, 0.3], dtype=dtype.int32) 187 self.c = msd.Categorical([0.7, 0.3], dtype=dtype.int32) 213 self.c = msd.Categorical([0.7, 0.3], dtype=dtype.int32) 239 self.c = msd.Categorical([0.7, 0.3], dtype=dtype.int32) [all …]
|
D | test_uniform.py | 20 import mindspore.nn.probability.distribution as msd namespace 32 self.u = msd.Uniform([0.0], [[1.0], [2.0]], dtype=dtype.float32) 55 self.u = msd.Uniform([0.0], [[1.0], [2.0]], dtype=dtype.float32) 78 self.u = msd.Uniform([0.0], [1.5], dtype=dtype.float32) 103 self.u = msd.Uniform([0.0], [3.0], dtype=dtype.float32) 126 self.u = msd.Uniform([0.0], [[1.0], [2.0]], seed=seed, dtype=dtype.float32) 150 self.u = msd.Uniform([0.0], [1.0], dtype=dtype.float32) 173 self.u = msd.Uniform([0.0], [1.0], dtype=dtype.float32) 184 self.u = msd.Uniform([0.0], [1.0], dtype=dtype.float32) 195 self.u = msd.Uniform([0.0], [1.0], dtype=dtype.float32) [all …]
|
D | test_exponential.py | 20 import mindspore.nn.probability.distribution as msd namespace 32 self.e = msd.Exponential([[1.0], [0.5]], dtype=dtype.float32) 55 self.e = msd.Exponential([[1.0], [0.5]], dtype=dtype.float32) 78 self.e = msd.Exponential([1.5], dtype=dtype.float32) 101 self.e = msd.Exponential([0.5], dtype=dtype.float32) 126 self.e = msd.Exponential([[1.0], [0.5]], seed=seed, dtype=dtype.float32) 149 self.e = msd.Exponential([[1.0], [0.5]], dtype=dtype.float32) 172 self.e = msd.Exponential([[1.0], [0.5]], dtype=dtype.float32) 195 self.e = msd.Exponential([[1.0], [0.5]], dtype=dtype.float32) 218 self.e = msd.Exponential([[1.0], [0.5]], dtype=dtype.float32) [all …]
|
D | test_bernoulli.py | 20 import mindspore.nn.probability.distribution as msd namespace 34 self.b = msd.Bernoulli(0.7, dtype=dtype.int32) 61 self.b = msd.Bernoulli(0.7, dtype=dtype.int32) 89 self.b = msd.Bernoulli(0.7, dtype=dtype.int32) 118 self.b = msd.Bernoulli([0.3, 0.5, 0.7], dtype=dtype.int32) 146 self.b = msd.Bernoulli([0.7, 0.5], seed=seed, dtype=dtype.int32) 170 self.b = msd.Bernoulli(0.7, dtype=dtype.int32) 197 self.b = msd.Bernoulli(0.7, dtype=dtype.int32) 225 self.b = msd.Bernoulli(0.7, dtype=dtype.int32) 253 self.b = msd.Bernoulli(0.7, dtype=dtype.int32) [all …]
|
D | test_geometric.py | 20 import mindspore.nn.probability.distribution as msd namespace 34 self.g = msd.Geometric(0.7, dtype=dtype.int32) 61 self.g = msd.Geometric(0.7, dtype=dtype.int32) 88 self.g = msd.Geometric(0.7, dtype=dtype.int32) 117 self.g = msd.Geometric([0.5, 0.5], dtype=dtype.int32) 145 self.g = msd.Geometric([0.7, 0.5], seed=seed, dtype=dtype.int32) 169 self.g = msd.Geometric(0.7, dtype=dtype.int32) 196 self.g = msd.Geometric(0.7, dtype=dtype.int32) 223 self.g = msd.Geometric(0.7, dtype=dtype.int32) 250 self.g = msd.Geometric(0.7, dtype=dtype.int32) [all …]
|
D | test_get_dist_args.py | 19 import mindspore.nn.probability.distribution as msd namespace 31 self.normal = msd.Normal(dtype=dtype.float32) 32 self.normal1 = msd.Normal(0.0, 1.0, dtype=dtype.float32) 33 self.normal2 = msd.Normal(3.0, 4.0, dtype=dtype.float32) 71 self.expon = msd.Exponential(dtype=dtype.float32) 72 self.expon1 = msd.Exponential(1.0, dtype=dtype.float32) 73 self.expon2 = msd.Exponential(2.0, dtype=dtype.float32)
|
D | test_cauchy.py | 20 import mindspore.nn.probability.distribution as msd namespace 32 self.c = msd.Cauchy(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 54 self.c = msd.Cauchy(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 76 self.c = msd.Cauchy(np.array([3.]), np.array([4.]), dtype=dtype.float32) 109 self.c = msd.Cauchy(np.array([3.0]), np.array([2.0, 4.0]), dtype=dtype.float32) 130 … self.c = msd.Cauchy(np.array([3.0]), np.array([[2.0], [4.0]]), seed=seed, dtype=dtype.float32) 154 self.c = msd.Cauchy(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 177 self.c = msd.Cauchy(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 199 self.c = msd.Cauchy(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 221 self.c = msd.Cauchy(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) [all …]
|
D | test_logistic.py | 20 import mindspore.nn.probability.distribution as msd namespace 32 self.l = msd.Logistic(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 54 self.l = msd.Logistic(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 76 self.l = msd.Logistic(np.array([3.0]), np.array([2.0, 4.0]), dtype=dtype.float32) 100 … self.l = msd.Logistic(np.array([3.0]), np.array([[2.0], [4.0]]), seed=seed, dtype=dtype.float32) 124 self.l = msd.Logistic(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 147 self.l = msd.Logistic(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 169 self.l = msd.Logistic(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 191 self.l = msd.Logistic(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 213 self.l = msd.Logistic(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32)
|
D | test_poisson.py | 20 import mindspore.nn.probability.distribution as msd namespace 32 self.p = msd.Poisson([0.5], dtype=dtype.float32) 55 self.p = msd.Poisson([0.5], dtype=dtype.float32) 78 self.p = msd.Poisson([1.44], dtype=dtype.float32) 103 self.p = msd.Poisson([[1.0], [0.5]], seed=seed, dtype=dtype.float32) 126 self.p = msd.Poisson([0.5], dtype=dtype.float32) 149 self.p = msd.Poisson([0.5], dtype=dtype.float32) 172 self.p = msd.Poisson([0.5], dtype=dtype.float32) 195 self.p = msd.Poisson([0.5], dtype=dtype.float32)
|
D | test_gamma.py | 21 import mindspore.nn.probability.distribution as msd namespace 33 self.g = msd.Gamma(np.array([3.0]), np.array([1.0]), dtype=dtype.float32) 55 self.g = msd.Gamma(np.array([3.0]), np.array([1.0]), dtype=dtype.float32) 78 self.g = msd.Gamma(np.array([3.0]), np.array([4.0]), dtype=dtype.float32) 112 self.g = msd.Gamma(np.array([3.0]), np.array([1.0]), dtype=dtype.float32) 138 self.g = msd.Gamma(np.array([3.0]), np.array([1.0]), seed=seed, dtype=dtype.float32) 162 self.g = msd.Gamma(np.array([3.0]), np.array([1.0]), dtype=dtype.float32) 185 self.g = msd.Gamma(np.array([3.0]), np.array([1.0]), dtype=dtype.float32) 207 self.g = msd.Gamma(np.array([3.0]), np.array([1.0]), dtype=dtype.float32) 229 self.g = msd.Gamma(np.array([3.0]), np.array([1.0]), dtype=dtype.float32) [all …]
|
D | test_normal.py | 20 import mindspore.nn.probability.distribution as msd namespace 32 self.n = msd.Normal(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 54 self.n = msd.Normal(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 77 self.n = msd.Normal(np.array([3.0]), np.array([4.0]), dtype=dtype.float32) 110 self.n = msd.Normal(np.array([3.0]), np.array([2.0, 4.0]), dtype=dtype.float32) 134 … self.n = msd.Normal(np.array([3.0]), np.array([[2.0], [4.0]]), seed=seed, dtype=dtype.float32) 158 self.n = msd.Normal(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 181 self.n = msd.Normal(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 203 self.n = msd.Normal(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) 225 self.n = msd.Normal(np.array([3.0]), np.array([[2.0], [4.0]]), dtype=dtype.float32) [all …]
|
D | test_lognormal.py | 20 import mindspore.nn.probability.distribution as msd namespace 32 self.ln = msd.LogNormal(np.array([0.3]), np.array([[0.2], [0.4]]), dtype=dtype.float32) 54 self.ln = msd.LogNormal(np.array([0.3]), np.array([[0.2], [0.4]]), dtype=dtype.float32) 76 self.ln = msd.LogNormal(np.array([0.3]), np.array([0.4]), dtype=dtype.float32) 108 self.ln = msd.LogNormal(np.array([0.3]), np.array([[0.2], [0.4]]), dtype=dtype.float32) 134 … self.ln = msd.LogNormal(np.array([0.3]), np.array([[0.2], [0.4]]), seed=seed, dtype=dtype.float32) 158 self.ln = msd.LogNormal(np.array([0.3]), np.array([[0.2], [0.4]]), dtype=dtype.float32) 180 self.ln = msd.LogNormal(np.array([0.3]), np.array([[0.2], [0.4]]), dtype=dtype.float32) 202 self.ln = msd.LogNormal(np.array([0.3]), np.array([[0.2], [0.4]]), dtype=dtype.float32) 224 self.ln = msd.LogNormal(np.array([0.3]), np.array([[0.2], [0.4]]), dtype=dtype.float32) [all …]
|
D | test_gumbel.py | 21 import mindspore.nn.probability.distribution as msd namespace 33 self.gum = msd.Gumbel(np.array([0.0]), np.array([[1.0], [2.0]]), dtype=dtype.float32) 58 self.gum = msd.Gumbel(np.array([0.0]), np.array([[1.0], [2.0]]), dtype=dtype.float32) 82 self.gum = msd.Gumbel(np.array([0.0]), np.array([1.0, 2.0]), dtype=dtype.float32) 114 self.gum = msd.Gumbel(np.array([0.0]), np.array([[1.0], [2.0]]), dtype=dtype.float32) 143 … self.gum = msd.Gumbel(np.array([0.0]), np.array([1.0, 2.0, 3.0]), dtype=dtype.float32, seed=seed) 165 self.gum = msd.Gumbel(np.array([0.0]), np.array([[1.0], [2.0]]), dtype=dtype.float32) 189 self.gum = msd.Gumbel(np.array([0.0]), np.array([[1.0], [2.0]]), dtype=dtype.float32) 213 self.gum = msd.Gumbel(np.array([0.0]), np.array([[1.0], [2.0]]), dtype=dtype.float32) 237 self.gum = msd.Gumbel(np.array([0.0]), np.array([[1.0], [2.0]]), dtype=dtype.float32) [all …]
|