Home
last modified time | relevance | path

Searched refs:grad_all (Results 1 – 25 of 124) sorted by relevance

12345

/third_party/mindspore/tests/st/networks/
Dtest_cell_bprop.py32 grad_all = C.GradOperation(get_all=True) variable
50 assert grad_all(mul_add)(x, y) == (2, 4)
69 assert grad_all(inline_mul_add)(x, y) == (3, 6)
91 grad_all(with_param)(1, 2)
105 assert grad_all(with_no_bprop)(x, y) == (2, 1)
125 return self.f(x, y), grad_all(self.f)(x, y)
128 grads = grad_all(self.f)(x, y)
140 grads = grad_all(grad_in_bprop)(Tensor(np.ones([2, 2]).astype(np.float32)),
166 return self.f(x, y), grad_all(self.f)(x, y)
169 grads = grad_all(self.f)(x, y)
[all …]
/third_party/mindspore/tests/ut/python/pynative_mode/
Dtest_high_order_grad.py22 grad_all = C.GradOperation(get_all=True) variable
59 return grad_all(single)(x)[0]
65 return grad_all(first_derivative_all)(x)[0]
70 return grad_all(second_derivative_all)(x)[0]
Dtest_framstruct.py37 grad_all = C.GradOperation(get_all=True) variable
113 return grad_all(mul)(x, y)
118 return grad_all(add_mul)(x, y)
301 return grad_all(if_test)(x, y)
388 return grad_all(_while)(x)
484 return grad_all(_for)(x)
754 …assert grad_all(grad_refactor_simple_1)(Tensor(2, dtype=ms.int32), Tensor(1, dtype=ms.int32)) == (…
766 assert grad_all(grad_refactor_simple_2)(x, y, z) == (7, 4, 7)
779 assert grad_all(grad_refactor_1)(Tensor(2, dtype=ms.int32), Tensor(3, dtype=ms.int32)) == (3, 2)
792 … assert grad_all(grad_refactor_2)(Tensor(2, dtype=ms.int32), Tensor(3, dtype=ms.int32)) == (27, 54)
[all …]
Dtest_ms_function.py24 grad_all = C.GradOperation(get_all=True) variable
45 grad_all(net)(input_x, input_y)
74 grad_out = grad_all(net)(input_x)
Dtest_outermost_non_tensor_input.py42 self.grad_all = C.GradOperation(get_all=get_all)
45 … return self.grad_all(self.forward_net)(tuple_a, tensor_x, list_b, tensor_y, scalar, dict_c, flag)
53 self.grad_all = C.GradOperation(get_all=get_all)
56 … return self.grad_all(self.forward_net)(tuple_a, tensor_x, list_b, tensor_y, tensor_z, dict_c)
Dtest_stop_gradient.py36 grad_all = C.GradOperation(get_all=True) variable
93 return grad_all(stop_test2)(x, y)
99 return grad_all(stop_test3)(x, y)
105 return grad_all(stop_test5)(x, y)
264 assert grad_all(stop_test)(Tensor(1, dtype=ms.int32)) == (0,)
274 assert grad_all(stop_test)(Tensor(1, dtype=ms.int32)) == (1,)
283 assert grad_all(stop_test)(Tensor(1, dtype=ms.int32), Tensor(3, dtype=ms.int32)) == (0, 0)
445 grad_all(StopPrint())(Tensor(np.ones([2]).astype(np.float32)),
Dtest_insert_grad_of.py30 grad_all = C.GradOperation(get_all=True) variable
55 return grad_all(stop_test)(x, y)
90 return grad_all(clip_test)(x, y)
/third_party/mindspore/tests/st/hook/
Dtest_hook_function.py23 grad_all = C.GradOperation(get_all=True) variable
86 grad_out1 = grad_all(net1)(input_x)
89 grad_out2 = grad_all(net2)(input_x)
153 grad_out1 = grad_all(net1)(input_x)
156 grad_out2 = grad_all(net2)(input_x)
/third_party/mindspore/tests/ut/python/pipeline/parse/
Dtest_outermost_net_pass_non_tensor_inputs.py42 self.grad_all = C.GradOperation(get_all=get_all)
45 … return self.grad_all(self.forward_net)(tuple_a, tensor_x, list_b, tensor_y, scalar, dict_c, flag)
53 self.grad_all = C.GradOperation(get_all=get_all)
56 … return self.grad_all(self.forward_net)(tuple_a, tensor_x, list_b, tensor_y, tensor_z, dict_c)
Dtest_parse.py47 grad_all = C.GradOperation(get_all=True) variable
187 grad_all(BpropWithWrongOutputNumCell())(Tensor(np.array(1).astype(np.int32)),
222 grad_all(BpropWithWrongOutputTypeCell())(Tensor(np.ones([64, 10]).astype(np.int32)))
260 grad_all(net)(Tensor(np.ones([64, 10]).astype(np.int32)))
283 grad_all = C.GradOperation(get_all=True) variable
292 return out, grad_all(self.net)(*inputs)
Dtest_tuple_index_by_negative.py46 self.grad_all = C.GradOperation(get_all=get_all)
49 return self.grad_all(self.forward_net)(x)
/third_party/mindspore/tests/st/control/inner/
Dtest_002_single_for.py25 grad_all = C.GradOperation(get_all=True) variable
53 return grad_all(self.net)(*inputs)
97 return grad_all(self.net)(*inputs)
151 return grad_all(self.net)(*inputs)
197 return grad_all(self.net)(*inputs)
242 return grad_all(self.net)(*inputs)
Dtest_030_for_in_if.py24 grad_all = C.GradOperation(get_all=True) variable
57 return grad_all(self.net)(*inputs)
108 return grad_all(self.net)(*inputs)
160 return grad_all(self.net)(*inputs)
210 return grad_all(self.net)(*inputs)
262 return grad_all(self.net)(*inputs)
Dtest_310_for_after_if_in_if.py22 grad_all = C.GradOperation(get_all=True) variable
58 return grad_all(self.net)(*inputs)
108 return grad_all(self.net)(*inputs)
Dtest_031_for_in_while.py24 grad_all = C.GradOperation(get_all=True) variable
58 return grad_all(self.net)(*inputs)
105 return grad_all(self.net)(*inputs)
Dtest_032_for_in_for.py24 grad_all = C.GradOperation(get_all=True) variable
63 return grad_all(self.net)(*inputs)
111 return grad_all(self.net)(*inputs)
Dtest_300_for_after_if.py22 grad_all = C.GradOperation(get_all=True) variable
53 return grad_all(self.net)(*inputs)
Dtest_132_if_after_for_in_for.py22 grad_all = C.GradOperation(get_all=True) variable
54 return grad_all(self.net)(*inputs)
Dtest_130_if_after_for_in_if.py22 grad_all = C.GradOperation(get_all=True) variable
54 return grad_all(self.net)(*inputs)
Dtest_131_if_after_for_in_while.py22 grad_all = C.GradOperation(get_all=True) variable
50 return grad_all(self.net)(*inputs)
/third_party/mindspore/tests/st/armour/
Dtest_pynative_mindarmour.py122 grad_all = GradWithSens(net)
124 grad_out = grad_all(Tensor(inputs_np), Tensor(sens)).asnumpy()
150 grad_all = GradWrapWithLoss(with_loss_cell)
151 grad_out = grad_all(Tensor(inputs_np), Tensor(labels_np)).asnumpy()
/third_party/mindspore/tests/st/pynative/
Dtest_pynative_hook.py33 grad_all = C.GradOperation(get_all=True) variable
196 grad_all(mul_add)(Tensor(1, mstype.float32), Tensor(2, mstype.float32))
197 assert grad_all(mul_add)(Tensor(1, mstype.float32), Tensor(2, mstype.float32)) == \
210 grad_all(ms_Cell)(Tensor(1, mstype.float32))
222 assert grad_all(ms_Cell)(Tensor(1, mstype.float32)) == (Tensor(0.0, mstype.float32),)
/third_party/mindspore/tests/ut/python/parallel/
Dtest_auto_parallel_assign_sub_with_ref_key.py28 grad_all = C.GradOperation(get_all=True) variable
48 return grad_all(self.network)(x)
Dtest_scalar_loss.py27 grad_all = C.GradOperation(get_all=True) variable
36 return grad_all(self.network)(x, y)
Dtest_auto_parallel_segment_min.py27 grad_all = C.GradOperation(get_all=True) variable
47 return grad_all(self.network)(vectors, index)

12345