/third_party/mindspore/tests/st/networks/ |
D | test_cell_bprop.py | 32 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/ |
D | test_high_order_grad.py | 22 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]
|
D | test_framstruct.py | 37 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 …]
|
D | test_ms_function.py | 24 grad_all = C.GradOperation(get_all=True) variable 45 grad_all(net)(input_x, input_y) 74 grad_out = grad_all(net)(input_x)
|
D | test_outermost_non_tensor_input.py | 42 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)
|
D | test_stop_gradient.py | 36 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)),
|
D | test_insert_grad_of.py | 30 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/ |
D | test_hook_function.py | 23 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/ |
D | test_outermost_net_pass_non_tensor_inputs.py | 42 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)
|
D | test_parse.py | 47 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)
|
D | test_tuple_index_by_negative.py | 46 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/ |
D | test_002_single_for.py | 25 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)
|
D | test_030_for_in_if.py | 24 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)
|
D | test_310_for_after_if_in_if.py | 22 grad_all = C.GradOperation(get_all=True) variable 58 return grad_all(self.net)(*inputs) 108 return grad_all(self.net)(*inputs)
|
D | test_031_for_in_while.py | 24 grad_all = C.GradOperation(get_all=True) variable 58 return grad_all(self.net)(*inputs) 105 return grad_all(self.net)(*inputs)
|
D | test_032_for_in_for.py | 24 grad_all = C.GradOperation(get_all=True) variable 63 return grad_all(self.net)(*inputs) 111 return grad_all(self.net)(*inputs)
|
D | test_300_for_after_if.py | 22 grad_all = C.GradOperation(get_all=True) variable 53 return grad_all(self.net)(*inputs)
|
D | test_132_if_after_for_in_for.py | 22 grad_all = C.GradOperation(get_all=True) variable 54 return grad_all(self.net)(*inputs)
|
D | test_130_if_after_for_in_if.py | 22 grad_all = C.GradOperation(get_all=True) variable 54 return grad_all(self.net)(*inputs)
|
D | test_131_if_after_for_in_while.py | 22 grad_all = C.GradOperation(get_all=True) variable 50 return grad_all(self.net)(*inputs)
|
/third_party/mindspore/tests/st/armour/ |
D | test_pynative_mindarmour.py | 122 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/ |
D | test_pynative_hook.py | 33 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/ |
D | test_auto_parallel_assign_sub_with_ref_key.py | 28 grad_all = C.GradOperation(get_all=True) variable 48 return grad_all(self.network)(x)
|
D | test_scalar_loss.py | 27 grad_all = C.GradOperation(get_all=True) variable 36 return grad_all(self.network)(x, y)
|
D | test_auto_parallel_segment_min.py | 27 grad_all = C.GradOperation(get_all=True) variable 47 return grad_all(self.network)(vectors, index)
|