Home
last modified time | relevance | path

Searched refs:new_grad (Results 1 – 17 of 17) sorted by relevance

/third_party/mindspore/tests/ut/cpp/kernel/cpu/
Dsparse_apply_ftrl_cpu_kernel_test.cc59 void CreateWorkspaceAddress(std::vector<float> &new_grad, std::vector<int64_t> &new_indices, in CreateWorkspaceAddress() argument
61 workspace_.push_back(CreateKernelAddress(new_grad.data())); in CreateWorkspaceAddress()
91 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
95 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
118 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
122 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
149 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
153 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
Dsparse_apply_proximal_adagrad_cpu_kernel_test.cc57 void CreateWorkspaceAddress(std::vector<float> &new_grad, std::vector<int64_t> &new_indices, in CreateWorkspaceAddress() argument
59 workspace_.push_back(CreateKernelAddress(new_grad.data())); in CreateWorkspaceAddress()
90 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
94 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
116 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
120 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
146 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
150 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
Dsparse_apply_lazy_adam_cpu_kernel_test.cc61 void CreateWorkspaceAddress(std::vector<float> &new_grad, std::vector<int64_t> &new_indices, in CreateWorkspaceAddress() argument
63 workspace_.push_back(CreateKernelAddress(new_grad.data())); in CreateWorkspaceAddress()
99 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
103 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
126 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
130 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
157 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
161 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
Dsparse_apply_adam_cpu_kernel_test.cc61 void CreateWorkspaceAddress(std::vector<float> &new_grad, std::vector<int64_t> &new_indices, in CreateWorkspaceAddress() argument
64 workspace_.push_back(CreateKernelAddress(new_grad.data())); in CreateWorkspaceAddress()
101 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
106 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices, m_t); in TEST_F()
129 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
134 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices, m_t); in TEST_F()
161 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local
166 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices, m_t); in TEST_F()
/third_party/mindspore/tests/ut/python/ops/
Dtest_dynamic_shape.py51 new_grad = self.expand_dims(ids, 1)
52 new_grad = self.cast(new_grad, mstype.float32) + grad
53 return self.net(new_grad, ids)
85 new_grad = self.expand_dims(ids, 1)
86 new_grad = self.cast(new_grad, mstype.float32) + grad
87 return self.net(new_grad, ids)
/third_party/mindspore/mindspore/nn/wrap/
Dgrad_reducer.py411 new_grad = grads
414 new_grad = self.map_(F.partial(reduce_opt, self.degree, self.mean, self.allgather),
417 new_grad = self.map_(F.partial(reduce_opt, self.degree, self.mean, self.allgather),
421 new_grad = self.map_(F.partial(reduce_opt, self.degree, self.mean, self.allgather,
424 new_grad = self.map_(F.partial(reduce_opt, self.degree, self.mean, self.allgather,
426 new_grad = self.map_(F.partial(_cast_datatype), datatypes, new_grad)
427 return new_grad
Dloss_scale.py440 new_grad = accu_grad * reciprocal(scale)
441 accu_grad = F.depend(accu_grad, new_grad)
443 new_grad = F.depend(new_grad, F.assign(accu_grad, zeros))
444 return new_grad
449 new_grad = grad * reciprocal(scale)
450 accu_grad = F.depend(accu_grad, new_grad)
451 new_grad = F.depend(new_grad, F.assign(accu_grad, F.zeros_like(accu_grad)))
452 return new_grad
/third_party/mindspore/tests/ut/python/parallel/
Dtest_loss_scale.py52 new_grad = C.clip_by_value(grad, F.cast(F.tuple_to_array((-clip_value,)), dt),
55 new_grad = nn.ClipByNorm()(grad, F.cast(F.tuple_to_array((clip_value,)), dt))
56 return new_grad
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/
Dsparse_apply_proximal_adagrad_cpu_kernel.cc136 auto new_grad = reinterpret_cast<float *>(workspace[0]->addr); in LaunchKernel() local
141 SparseGradient<T> unique_sparse_grad({new_grad, new_indices, indices_size_}); in LaunchKernel()
Dsparse_apply_lazy_adam_cpu_kernel.cc139 auto *new_grad = reinterpret_cast<float *>(workspace[0]->addr); in LaunchKernel() local
144 SparseGradient<T> unique_sparse_grad({new_grad, new_indices, indices_size_}); in LaunchKernel()
Dsparse_apply_ftrl_cpu_kernel.cc147 auto *new_grad = reinterpret_cast<float *>(workspace[0]->addr); in LaunchKernel() local
152 SparseGradient<T> unique_sparse_grad({new_grad, new_indices, indices_size_}); in LaunchKernel()
Dsparse_apply_adam_cpu_kernel.cc159 auto *new_grad = reinterpret_cast<float *>(workspace[0]->addr); in LaunchKernel() local
165 SparseGradient<T> unique_sparse_grad({new_grad, new_indices, indices_size_}); in LaunchKernel()
/third_party/mindspore/tests/st/fl/albert/src/
Dcell_wrapper.py85 new_grad = C.clip_by_value(grad, F.cast(F.tuple_to_array((-clip_value,)), dt),
88 new_grad = ClipByNorm()(grad, F.cast(F.tuple_to_array((clip_value,)), dt))
89 return new_grad
/third_party/mindspore/tests/st/networks/models/bert/src/
Dbert_for_pre_training.py56 new_grad = C.clip_by_value(grad, F.cast(F.tuple_to_array((-clip_value,)), dt),
59 new_grad = nn.ClipByNorm()(grad, F.cast(F.tuple_to_array((clip_value,)), dt))
60 return new_grad
/third_party/mindspore/mindspore/ccsrc/ps/
Doptimizer_info.cc190 std::vector<float> new_grad(indices_size * segment_size); in ComputeMean() local
192 …mindspore::kernel::SparseGradient<int> unique_sparse_grad({new_grad.data(), new_indices.data(), in… in ComputeMean()
Dworker.cc798 std::vector<float> new_grad(partition_segment_size); in SparsePartitioner() local
800 …mindspore::kernel::SparseGradient<int> unique_sparse_grad({new_grad.data(), new_indices.data(), in… in SparsePartitioner()
/third_party/mindspore/mindspore/nn/optim/
Dthor.py87 new_grad = C.clip_by_value(grad, F.cast(F.tuple_to_array((-clip_value,)), dt),
90 new_grad = nn.ClipByNorm()(grad, F.cast(F.tuple_to_array((clip_value,)), dt))
91 return new_grad