Home
last modified time | relevance | path

Searched refs:float32 (Results 1 – 25 of 1527) sorted by relevance

12345678910>>...62

/third_party/mindspore/mindspore/numpy/
Ddtypes.py18 float16, float32, float64, bool_)
34 float_ = float32
65 float32,
82 'float32': float32,
128 (uint8, float32): float32,
131 (uint16, float32): float32,
132 (uint16, float64): float32,
134 (uint32, float32): float32,
137 (uint64, float32): float32,
146 (int8, float32): float32,
[all …]
/third_party/mindspore/tests/ut/python/pynative_mode/vm/
Dtest_vm.py26 [-2., -1., -2., -15.]]]]).astype(np.float32)
40 [13, 14, 15, 16]]]]).astype(np.float32)
65 [2, 4, 5, 2, 3, 9]]]]).astype(np.float32)
66 weight = np.array([[[[1, 0, -1], [1, 0, -1], [1, 0, -1]]]]).astype(np.float32)
72 [-3., -2., -3., -16.]]]]).astype(np.float32)
84 [2, 4, 5, 2, 3, 9]]]]).astype(np.float32)
85 weight = np.array([[[[1, 0, -1], [1, 0, -1], [1, 0, -1]]]]).astype(np.float32)
86 bias = np.array([1]).astype(np.float32)
92 [-2., -1., -2., -15.]]]]).astype(np.float32)
104 [2, 4, 5, 2, 3, 9]]]]).astype(np.float32)
[all …]
/third_party/mindspore/tests/ut/python/ops/
Dtest_nn_ops_check.py67 'desc_inputs': [Tensor(np.ones([3, 4]).astype(np.float32))],
72 'desc_inputs': [Tensor(np.ones([3, 4]).astype(np.float32))],
83 'desc_inputs': [Tensor(np.ones([3, 4]).astype(np.float32))],
144 …'desc_inputs': [Tensor(np.ones([5, 3]).astype(np.float32)), Tensor(np.ones([5, 3]).astype(np.float…
145 Tensor(np.ones([5, 3]).astype(np.float32)), None, None],
150 …'desc_inputs': [Tensor(np.ones([5, 3]).astype(np.float32)), Tensor(np.ones([3]).astype(np.float32)…
151 … Tensor(np.ones([3]).astype(np.float32)), Tensor(np.ones([3]).astype(np.float16)),
152 Tensor(np.ones([3]).astype(np.float32))],
157 …'desc_inputs': [Tensor(np.ones([5, 3]).astype(np.float32)), Tensor(np.ones([5, 3]).astype(np.float…
158 … Tensor(np.ones([5, 3]).astype(np.float32)), Tensor(np.ones([3]).astype(np.float32)),
[all …]
Dtest_math_ops_check.py85 …'desc_inputs': [Tensor(np.ones([3, 5]).astype(np.float32)), Tensor(np.ones([3, 4]).astype(np.float…
104 'desc_inputs': [Tensor(np.ones([2, 3, 5]).astype(np.float32))],
110 'desc_inputs': [Tensor(np.ones([2, 3, 5]).astype(np.float32))],
117 'desc_inputs': [Tensor(np.ones([2, 3, 5]).astype(np.float32))],
123 'desc_inputs': [Tensor(np.ones([2, 3, 5]).astype(np.float32))],
143 'desc_inputs': [Tensor(np.ones([2, 3, 5]).astype(np.float32))],
149 'desc_inputs': [Tensor(np.ones([2, 3, 5]).astype(np.float32))],
156 'desc_inputs': [Tensor(np.ones([2, 3, 5]).astype(np.float32))],
162 'desc_inputs': [Tensor(np.ones([2, 3, 5]).astype(np.float32))],
169 'desc_inputs': [Tensor(np.ones([2, 3, 5]).astype(np.float32))],
[all …]
/third_party/mindspore/config/
Dop_info.config2 …oat16", "DefaultFormat"]], [["int32", "DefaultFormat"], ["float32", "DefaultFormat"], ["float32", …
4float32", "DefaultFormat"], ["int32", "DefaultFormat"], ["int32", "DefaultFormat"], ["float32", "D…
5 …t16", "DefaultFormat"], ["float16", "DefaultFormat"]], [["float32", "DefaultFormat"], ["float32", …
6float32", "DefaultFormat"], ["int32", "DefaultFormat"], ["int32", "DefaultFormat"], ["float32", "D…
7float32", "DefaultFormat"], ["float32", "DefaultFormat"]], [["int32", "DefaultFormat"], ["float64"…
8float32", "DefaultFormat"], ["int32", "DefaultFormat"], ["int32", "DefaultFormat"], ["float32", "D…
9 …t16", "DefaultFormat"], ["float16", "DefaultFormat"]], [["float32", "DefaultFormat"], ["float32", …
10float32", "DefaultFormat"]], [["int64", "DefaultFormat"], ["int16", "DefaultFormat"], ["int64", "D…
15 …loat16", "DefaultFormat"], ["bool", "DefaultFormat"]], [["float32", "DefaultFormat"], ["float32", …
16 …loat16", "DefaultFormat"], ["bool", "DefaultFormat"]], [["float32", "DefaultFormat"], ["float32", …
[all …]
/third_party/skia/third_party/externals/oboe/samples/RhythmGame/third_party/glm/detail/
Dglm.cpp19 template struct tvec1<float32, lowp>;
30 template struct tvec1<float32, mediump>;
41 template struct tvec1<float32, highp>;
53 template struct tvec2<float32, lowp>;
64 template struct tvec2<float32, mediump>;
75 template struct tvec2<float32, highp>;
87 template struct tvec3<float32, lowp>;
98 template struct tvec3<float32, mediump>;
109 template struct tvec3<float32, highp>;
121 template struct tvec4<float32, lowp>;
[all …]
/third_party/mindspore/tests/ut/python/nn/
Dtest_loss.py26 input_data = Tensor(np.array([[1, 2, 3], [2, 3, 4]]).astype(np.float32))
27 target_data = Tensor(np.array([[0, 2, 5], [3, 1, 1]]).astype(np.float32))
33 input_data = Tensor(np.array([[1, 2, 3], [2, 3, 2]]).astype(np.float32))
34 target_data = Tensor(np.array([[0, 0, 5], [1, 2, 3]]).astype(np.float32))
43 logits = Tensor(np.random.randint(0, 9, [100, 10]).astype(np.float32))
44 labels = Tensor(np.random.randint(0, 9, [100, 10]).astype(np.float32))
52 logits = Tensor(np.random.randint(0, 9, [100, 10]).astype(np.float32))
53 labels = Tensor(np.random.randint(0, 9, [100, 10]).astype(np.float32))
61 inputs_data = Tensor(np.array([[0.1, 0.2, 0.3], [0.5, 0.7, 0.9]]).astype(np.float32))
62 target_data = Tensor(np.array([[0, 1, 0], [0, 0, 1]]).astype(np.float32))
[all …]
/third_party/mindspore/tests/ut/python/nn/gradient/
Dtest_jvp_pynative.py47 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
48 v = Tensor(np.array([[1, 1], [1, 1]]).astype(np.float32))
54 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
55 v = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
61 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
62 v = Tensor(np.array([[1, 1], [1, 1]]).astype(np.float32))
68 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
69 v = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
75 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
76 y = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
[all …]
Dtest_jvp_graph.py48 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
49 v = Tensor(np.array([[1, 1], [1, 1]]).astype(np.float32))
55 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
56 v = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
62 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
63 v = Tensor(np.array([[1, 1], [1, 1]]).astype(np.float32))
69 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
70 v = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
76 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
77 y = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
[all …]
/third_party/mindspore/tests/st/auto_monad/
Dtest_effect_optimizer.py45 var = Tensor(np.ones([3, 3, 3]).astype(np.float32))
46 m = Tensor(np.ones([3, 3, 3]).astype(np.float32))
47 v = Tensor(np.ones([3, 3, 3]).astype(np.float32))
50 beta1_power = Tensor(0.9, mstype.float32)
51 beta2_power = Tensor(0.999, mstype.float32)
52 lr = Tensor(0.001, mstype.float32)
53 beta1 = Tensor(0.9, mstype.float32)
54 beta2 = Tensor(0.999, mstype.float32)
55 epsilon = Tensor(1e-8, mstype.float32)
56 grad = Tensor(np.random.rand(3, 3, 3).astype(np.float32))
[all …]
/third_party/mindspore/tests/st/ops/gpu/
Dtest_fake_quant_perchannel.py44 x = np.array([0.0, 0.0, 0.0, 0.0]).astype(np.float32)
45 min_val = np.array([0.0, 0.0, 0.0, 0.0]).astype(np.float32)
46 max_val = np.array([0.0, 0.0, 0.0, 0.0]).astype(np.float32)
47 expect = np.array([0.0, 0.0, 0.0, 0.0]).astype(np.float32)
65 x = np.array([-0.1, 0.0, 63.75, 63.8]).astype(np.float32)
66 min_val = np.array([-0.1, -0.1, -0.1, -0.1]).astype(np.float32)
67 max_val = np.array([63.65, 63.65, 63.65, 63.65]).astype(np.float32)
68 expect = np.array([0.0, 0.0, 63.75, 63.75]).astype(np.float32)
86 x = np.array([-0.1, 0.0, 63.5, 63.6]).astype(np.float32)
87 min_val = np.array([-0.1, -0.1, -0.1, -0.1]).astype(np.float32)
[all …]
Dtest_fake_quant_perlayer.py52 x = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]).reshape(2, 3).astype(np.float32)
53 min_val = np.array([0]).reshape(1).astype(np.float32)
54 max_val = np.array([0]).reshape(1).astype(np.float32)
55 expect = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]).astype(np.float32)
74 x = np.array([-10.1, -10.0, -9.9, -9.75, 53.75, 53.8]).reshape(2, 3).astype(np.float32)
75 min_val = np.array([-10.0]).reshape(1).astype(np.float32)
76 max_val = np.array([53.75]).reshape(1).astype(np.float32)
77 expect = np.array([-10.0, -10.0, -10.0, -9.75, 53.75, 53.75]).astype(np.float32)
94 x = np.array([-10.1, -10.0, -9.90, -9.75, 53.5, 53.6]).reshape(2, 3).astype(np.float32)
95 min_val = np.array([-10.0]).reshape(1).astype(np.float32)
[all …]
Dtest_layer_norm_grad_grad_op.py117 x_np = np.random.randn(4096, 3072).astype(np.float32)
118 dy_np = np.random.randn(4096, 3072).astype(np.float32)
119 gamma_np = np.random.randn(*x_np.shape[begin_params_axis:]).astype(np.float32)
121 grad_dx_np = np.random.randn(*x_np.shape).astype(np.float32)
122 grad_dg_np = np.random.randn(*x_np.shape[begin_params_axis:]).astype(np.float32)
123 grad_db_np = np.random.randn(*x_np.shape[begin_params_axis:]).astype(np.float32)
132 dy_ms = Tensor(dy_np.astype(np.float32))
133 x_ms = Tensor(x_np.astype(np.float32))
134 var_ms = Tensor(var_np.astype(np.float32))
135 mean_ms = Tensor(mean_np.astype(np.float32))
[all …]
Dtest_nll_loss.py71 if nptype_input == np.float32 and nptype_weight == np.float32:
76 if nptype_weight == np.float32:
118 if nptype_input == np.float32 and nptype_weight == np.float32:
131 nll_loss_template(np.float32, np.float32, "none")
132 nll_loss_template(np.float32, np.float16, "none")
133 nll_loss_template(np.float16, np.float32, "none")
142 nll_loss_template(np.float32, np.float32, "mean")
143 nll_loss_template(np.float32, np.float16, "mean")
144 nll_loss_template(np.float16, np.float32, "mean")
153 nll_loss_template(np.float32, np.float32, "sum")
[all …]
/third_party/mindspore/tests/st/gradient/
Dtest_jvp_graph.py51 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
52 v = Tensor(np.array([[1, 1], [1, 1]]).astype(np.float32))
54 expect_primal = Tensor(np.array([[1, 8], [27, 64]]).astype(np.float32))
55 expect_grad = Tensor(np.array([[3, 12], [27, 48]]).astype(np.float32))
65 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
66 v = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
68 expect_primal = Tensor(np.array([[1, 8], [27, 64]]).astype(np.float32))
69 expect_grad = Tensor(np.array([[3, 24], [81, 192]]).astype(np.float32))
79 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
80 v = Tensor(np.array([[1, 1], [1, 1]]).astype(np.float32))
[all …]
Dtest_jvp_pynative.py50 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
51 v = Tensor(np.array([[1, 1], [1, 1]]).astype(np.float32))
53 expect_primal = Tensor(np.array([[1, 8], [27, 64]]).astype(np.float32))
54 expect_grad = Tensor(np.array([[3, 12], [27, 48]]).astype(np.float32))
64 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
65 v = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
67 expect_primal = Tensor(np.array([[1, 8], [27, 64]]).astype(np.float32))
68 expect_grad = Tensor(np.array([[3, 24], [81, 192]]).astype(np.float32))
78 x = Tensor(np.array([[1, 2], [3, 4]]).astype(np.float32))
79 v = Tensor(np.array([[1, 1], [1, 1]]).astype(np.float32))
[all …]
/third_party/mindspore/tests/st/probability/distribution/
Dtest_gumbel.py33 self.gum = msd.Gumbel(np.array([0.0]), np.array([[1.0], [2.0]]), dtype=dtype.float32)
42 loc = np.array([0.0]).astype(np.float32)
43 scale = np.array([[1.0], [2.0]]).astype(np.float32)
45 value = np.array([1.0, 2.0]).astype(np.float32)
46 expect_pdf = gumbel_benchmark.pdf(value).astype(np.float32)
48 output = pdf(Tensor(value, dtype=dtype.float32))
58 self.gum = msd.Gumbel(np.array([0.0]), np.array([[1.0], [2.0]]), dtype=dtype.float32)
67 loc = np.array([0.0]).astype(np.float32)
68 scale = np.array([[1.0], [2.0]]).astype(np.float32)
70 expect_logpdf = gumbel_benchmark.logpdf([1.0, 2.0]).astype(np.float32)
[all …]
Dtest_uniform.py32 self.u = msd.Uniform([0.0], [[1.0], [2.0]], dtype=dtype.float32)
42 expect_pdf = uniform_benchmark.pdf([-1.0, 0.0, 0.5, 1.0, 1.5, 3.0]).astype(np.float32)
44 x_ = Tensor(np.array([-1.0, 0.0, 0.5, 1.0, 1.5, 3.0]).astype(np.float32), dtype=dtype.float32)
55 self.u = msd.Uniform([0.0], [[1.0], [2.0]], dtype=dtype.float32)
65 expect_logpdf = uniform_benchmark.logpdf([0.5]).astype(np.float32)
67 x_ = Tensor(np.array([0.5]).astype(np.float32), dtype=dtype.float32)
78 self.u = msd.Uniform([0.0], [1.5], dtype=dtype.float32)
93 output = kl(Tensor(low_b, dtype=dtype.float32), Tensor(high_b, 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)
[all …]
/third_party/mindspore/tests/st/ops/cpu/
Dtest_batchdot_op.py71 x1 = np.ones(shape=shape_x1).astype(np.float32)
72 x2 = np.ones(shape=shape_x2).astype(np.float32)
73 x1_tensor = Tensor(x1, dtype=mindspore.float32)
74 x2_tensor = Tensor(x2, dtype=mindspore.float32)
86 x1 = np.random.random(shape_x1).astype(np.float32)
87 x2 = np.random.random(shape_x2).astype(np.float32)
88 x1_tensor = Tensor(x1, dtype=mindspore.float32)
89 x2_tensor = Tensor(x2, dtype=mindspore.float32)
101 x1 = np.random.random(shape_x1).astype(np.float32)
102 x2 = np.random.random(shape_x2).astype(np.float32)
[all …]
/third_party/mindspore/tests/ut/python/nn/probability/distribution/
Dtest_utils.py34 tensor_fp32 = Tensor(0.1, dtype=dtype.float32)
37 array_fp32 = np.array(1.0).astype(np.float32)
54 assert ans1 == dtype.float32
57 set_param_type(dict2, dtype.float32)
60 assert ans3 == dtype.float32
62 assert ans4 == dtype.float32
65 set_param_type(dict5, dtype.float32)
67 set_param_type(dict6, dtype.float32)
69 ans7 = set_param_type(dict7, dtype.float32)
70 assert ans7 == dtype.float32
[all …]
Dtest_uniform.py32 msd.Uniform([[2.], [1.]], [[2.], [3.], [4.]], dtype=dtype.float32)
56 u = msd.Uniform([3.0], [4.0], dtype=dtype.float32)
65 msd.Uniform(0.0, 0.0, dtype=dtype.float32)
67 msd.Uniform(1.0, 0.0, dtype=dtype.float32)
77 self.u = msd.Uniform(3.0, 4.0, dtype=dtype.float32)
94 value = Tensor([3.1, 3.2, 3.3, 3.4], dtype=dtype.float32)
106 self.u = msd.Uniform(dtype=dtype.float32)
123 value = Tensor([0.1, 0.2, 0.3, 0.9], dtype=dtype.float32)
124 low = Tensor([0.0], dtype=dtype.float32)
125 high = Tensor([1.0], dtype=dtype.float32)
[all …]
Dtest_beta.py31 msd.Gamma([[2.], [1.]], [[2.], [3.], [4.]], dtype=dtype.float32)
69 g = msd.Gamma([3.0], [4.0], dtype=dtype.float32)
79 self.gamma = msd.Gamma([3.0, 4.0], [1.0, 1.0], dtype=dtype.float32)
91 value = Tensor([0.5, 1.0], dtype=dtype.float32)
114 value = Tensor([0.5, 1.0], dtype=dtype.float32)
115 concentration1 = Tensor([2.0, 3.0], dtype=dtype.float32)
116 concentration0 = Tensor([1.0], dtype=dtype.float32)
126 self.g1 = msd.Gamma(np.array([3.0]), np.array([4.0]), dtype=dtype.float32)
127 self.g2 = msd.Gamma(dtype=dtype.float32)
139 concentration1_b = Tensor(np.array([1.0]).astype(np.float32), dtype=dtype.float32)
[all …]
/third_party/mindspore/tests/ut/python/pynative_mode/
Dtest_bprop.py37 self.z = Parameter(Tensor(np.array([1.0], np.float32)), name='z')
47 grads = bprop(Net(), Tensor(np.ones([2, 3]).astype(np.float32)),
48 Tensor(np.ones([3, 2]).astype(np.float32)), wrt=['inputs'])
53 …ds = bprop(Net(), Tensor(np.ones([2, 3]).astype(np.float32)), Tensor(np.ones([3, 2]).astype(np.flo…
54 grads_wrt_outputs=(Tensor(np.ones([2, 3]).astype(np.float32)),
55 Tensor(np.ones([2, 2]).astype(np.float32))), wrt=['inputs'])
60 …ds = bprop(Net(), Tensor(np.ones([2, 3]).astype(np.float32)), Tensor(np.ones([3, 2]).astype(np.flo…
61 grads_wrt_outputs=(Tensor(np.ones([2, 3]).astype(np.float32)),
62 Tensor(np.ones([2, 2]).astype(np.float32))))
68 …rads = bprop(net, Tensor(np.ones([2, 3]).astype(np.float32)), Tensor(np.ones([3, 2]).astype(np.flo…
[all …]
/third_party/mindspore/tests/st/ops/graph_kernel/
Dtest_fused_adam.py40 Tensor(np.array([1, 3, 5]).astype(np.float32)), name='param')
42 Tensor(np.array([0.11, 0.33, 0.55]).astype(np.float32)), name='m')
44 Tensor(np.array([1.2, 3.4, 5.6]).astype(np.float32)), name='v')
48 param_fp32 = self.op_cast(self.param, mstype.float32)
49 m_fp32 = self.op_cast(self.m, mstype.float32)
50 v_fp32 = self.op_cast(self.v, mstype.float32)
51 gradient_fp32 = self.op_cast(gradient, mstype.float32)
55 mstype.float32), gradient_fp32)
57 … mstype.float32), self.op_square(gradient_fp32))
82 Tensor(np.array([0, 0, 0]).astype(np.float32)), name='param')
[all …]
/third_party/mindspore/tests/ut/python/pynative_mode/nn/
Dtest_tensor_operation.py22 x = Tensor(np.ones([3, 3, 3, 3]).astype(np.float32))
23 y = Tensor(np.ones([3, 3, 3, 3]).astype(np.float32))
29 x = Tensor(np.ones([3, 3, 3, 3]).astype(np.float32))
30 y = Tensor(np.ones([3, 3, 3, 3]).astype(np.float32))
36 x = Tensor(np.ones([3, 3, 3, 3]).astype(np.float32))
37 y = Tensor(np.ones([3, 3, 3, 3]).astype(np.float32))
45 x = Tensor(np.ones([3, 3, 3, 3]).astype(np.float32))
46 y = Tensor(np.ones([3, 3, 3, 3]).astype(np.float32))
54 x = Tensor(np.ones([3, 3, 3, 3]).astype(np.float32))
55 y = Tensor(np.ones([3, 3, 3, 3]).astype(np.float32))
[all …]

12345678910>>...62