Home
last modified time | relevance | path

Searched refs:grad_op (Results 1 – 25 of 26) sorted by relevance

12

/third_party/mindspore/tests/mindspore_test_framework/utils/
Dblock_util.py245 def __init__(self, network, grad_op, sens): argument
251 self.grad = grad_op
259 def __init__(self, network, grad_op): argument
265 self.grad = grad_op
272 def __init__(self, network, grad_op, sens): argument
278 self.grad = grad_op
287 def __init__(self, network, grad_op): argument
293 self.grad = grad_op
300 def gen_grad_net(net, grad_op, input_num, sens=None, training=True, desc_const=(), argument
304 if grad_op.get_by_list:
[all …]
Dbprop_util.py30 def __init__(self, func, wrt_params, params, grad_op, sens): argument
37 self.grad = grad_op
88 grad_op = GradOperation(get_all=wrt_inputs, get_by_list=wrt_params, sens_param=with_sens_param)
89 grad = Bprop(func, wrt_params, params, grad_op, grads_wrt_outputs)
Dcheck_gradient.py315 grad_op = GradOperation(get_all=True, sens_param=True)
316 … super(ScalarGradChecker, self).__init__(fn, grad_op, args, delta, max_error, input_selector, \
358 grad_op = GradOperation(get_all=True, sens_param=True)
359 … super(OperationGradChecker, self).__init__(fn, grad_op, args, delta, max_error, input_selector, \
390 grad_op = GradOperation(get_by_list=True, sens_param=True)
392 super(NNGradChecker, self).__init__(fn, grad_op, args, delta, max_error, input_selector, \
/third_party/mindspore/tests/perf_test/
Dtest_lenet.py44 self.grad_op = grad_all_with_sens
48 grad_op = self.grad_op(self.network)(x, sens)
50 return grad_op
73 grad_op = LeNetGrad(net)
75 _cell_graph_executor.compile(grad_op, inp, sens)
/third_party/mindspore/tests/st/gnn/
Dtest_gnn_aggregator.py36 self.grad_op = grad_all_with_sens
40 grad_op = self.grad_op(self.network)(x, sens)
41 return grad_op
56 grad_op = MeanAggregatorGrad(aggregator)
57 _cell_graph_executor.compile(grad_op, input_data, sens)
/third_party/mindspore/tests/mindspore_test_framework/components/function/
Drun_gradient_wrt_inputs.py25 grad_op = GradOperation(get_all=True, sens_param=True)
26 return create_funcs(self.verification_set, gen_grad_net, run_block, grad_op)
Drun_gradient_wrt_params.py25 grad_op = GradOperation(get_by_list=True, sens_param=True)
26 return create_funcs(self.verification_set, gen_grad_net, run_block, grad_op)
Dcompile_gradient_wrt_inputs.py49 grad_op = GradOperation(get_all=True, sens_param=True)
50 return create_funcs(self.verification_set, gen_grad_net, compile_block, grad_op)
Dcompile_gradient_wrt_params.py49 grad_op = GradOperation(get_by_list=True, sens_param=True)
50 return create_funcs(self.verification_set, gen_grad_net, compile_block, grad_op)
Dinit_params_with_rand_and_run_gradient_wrt_params.py25 grad_op = GradOperation(get_by_list=True, sens_param=True)
26 …return create_funcs(self.verification_set, gen_grad_net, run_block, grad_op, get_uniform_with_shap…
Dinit_params_with_rand_and_run_gradient_wrt_inputs.py25 grad_op = GradOperation(get_all=True, sens_param=True)
26 …return create_funcs(self.verification_set, gen_grad_net, run_block, grad_op, get_uniform_with_shap…
/third_party/mindspore/tests/ut/python/pynative_mode/
Dtest_tuple_parameter.py66 grad_op = C.GradOperation(get_all=True)
67 output = grad_op(net1)(x, y)
72 output = grad_op(net2)(x, y)
/third_party/mindspore/tests/ut/python/ir/
Dtest_sparse_tensor.py36 grad_op = C.GradOperation(get_all=True) variable
65 grad_op(SparseTensorGetAttr())(indices, values)
98 grad_op(SparseToDenseCell(dense_shape))(indices, values)
/third_party/mindspore/tests/st/control/
Dtest_while_grad.py33 self.grad_op = C.GradOperation(get_all=True)
36 gradient_function = self.grad_op(self.net)
/third_party/mindspore/tests/ut/python/optimizer/
Dtest_auto_grad.py379 self.grad_op = ops.GradOperation(get_all=2)
381 gradient_function = self.grad_op(self.net)
405 self.grad_op = ops.GradOperation(get_by_list=2)
407 gradient_function = self.grad_op(self.net)
431 self.grad_op = ops.GradOperation(sens_param=2)
433 gradient_function = self.grad_op(self.net)
457 self.grad_op = ops.GradOperation()
459 gradient_function = self.grad_op(None)
483 self.grad_op = ops.GradOperation()
485 gradient_function = self.grad_op()
[all …]
/third_party/mindspore/tests/st/ops/ascend/
Dtest_addn.py52 grad_op = C.GradOperation(get_all=True)
62 grad_op(AddN())(inp, inp)
/third_party/mindspore/tests/ut/python/parameter_feature/
Dtest_var_grad.py77 def __init__(self, func, wrt_params, params, grad_op, sens=None): argument
84 self.grad = grad_op
293 grad_op = C.GradOperation(get_all=False, get_by_list=True, sens_param=True)
295 self.grad = Bprop(self.net, True, self.weights, grad_op, sens)
314 grad_op = C.GradOperation(get_all=True, get_by_list=False, sens_param=True)
315 self.grad = Bprop(self.net, False, self.weights, grad_op)
/third_party/mindspore/tests/st/pynative/parser/
Dtest_parser_construct.py67 grad_op = grad(net1)
68 grad_me = grad_op(input_me, output_grad_me)
/third_party/mindspore/tests/st/ops/gpu/
Dtest_local_response_norm_op.py45 grad_op = self.grad(self.network, self.params)
46 output = grad_op(x, dy)
Dtest_conv3d_op.py107 grad_op = self.grad(self.network, self.params)
108 output = grad_op(x, dy)
Dtest_batchnorm_op.py227 grad_op = self.grad(self.network, self.params)
228 output = grad_op(x, dy)
/third_party/mindspore/tests/st/ops/cpu/
Dtest_l2loss_op.py113 self.grad_op = C.GradOperation(get_all=True)
116 gradient_function = self.grad_op(self.net)
Dtest_conv_op.py336 grad_op = self.grad(self.network, self.params)
337 output = grad_op(x, dy)
/third_party/mindspore/mindspore/ccsrc/debug/
Danf_ir_utils.cc217 prim::GradOperationPtr grad_op = meta_func_graph->cast<prim::GradOperationPtr>(); in GetMetaFuncGraphText() local
218 oss << "{get_all=" << grad_op->get_all_ << ", get_by_list=" << grad_op->get_by_list_ in GetMetaFuncGraphText()
219 << ", sens_param=" << grad_op->sens_param_ << "}"; in GetMetaFuncGraphText()
/third_party/mindspore/tests/ut/python/ops/
Dtest_control_ops.py571 self.grad_op = C.GradOperation(get_by_list=True, sens_param=False)
577 grad = self.grad_op(self.net, weights)(x, index)
601 self.grad_op = C.GradOperation(get_by_list=True, sens_param=False)
607 grad = self.grad_op(self.net, weights)(x, index)

12