/third_party/grpc/tools/run_tests/sanity/ |
D | check_test_filtering.py | 40 def test_filtering(self, changed_files=[], labels=_LIST_OF_LANGUAGE_LABELS): argument 61 if "sanity" in job.labels: 63 all_jobs = [job for job in all_jobs if "sanity" not in job.labels] 65 if "sanity" in job.labels: 68 job for job in filtered_jobs if "sanity" not in job.labels 73 for label in labels: 75 self.assertNotIn(label, job.labels) 78 for label in labels: 80 if (label in job.labels): 93 if label not in filter_pull_request_tests._CORE_TEST_SUITE.labels + [all …]
|
/third_party/mindspore/tests/st/fl/albert/src/ |
D | assessment_method.py | 28 def update(self, logits, labels): argument 29 labels = labels.asnumpy() 30 labels = np.reshape(labels, -1) 33 self.acc_num += np.sum(labels == logit_id) 34 self.total_num += len(labels) 48 def update(self, logits, labels): argument 49 labels = labels.asnumpy() 52 for i, label in enumerate(labels): 57 self.total_num += len(labels) 70 def update(self, logits, labels): argument [all …]
|
/third_party/python/Lib/encodings/ |
D | idna.py | 162 labels = result.split(b'.') 163 for label in labels[:-1]: 166 if len(labels[-1]) >= 64: 171 labels = dots.split(input) 172 if labels and not labels[-1]: 174 del labels[-1] 177 for label in labels: 204 labels = input.split(b".") 206 if labels and len(labels[-1]) == 0: 208 del labels[-1] [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/ |
D | cross_entropy_impl.cu | 24 __global__ void CrossEntropyWithSparseKernel(const T *logits, const S *labels, const size_t batch_s… in CrossEntropyWithSparseKernel() argument 29 T logit = logits[i * class_num + labels[i]]; in CrossEntropyWithSparseKernel() 40 __global__ void LargeBatchCrossEntropyWithSparseKernel(const T *logits, const S *labels, const size… in LargeBatchCrossEntropyWithSparseKernel() argument 45 T logit = logits[index * class_num + labels[index]]; in LargeBatchCrossEntropyWithSparseKernel() 54 __global__ void CrossEntropyGradWithSparseKernel(const T *logits, const S *labels, const size_t bat… in CrossEntropyGradWithSparseKernel() argument 58 if (labels[j] == i) { in CrossEntropyGradWithSparseKernel() 68 __global__ void CrossEntropyKernel(const T *logits, const S *labels, const size_t batch_size, const… in CrossEntropyKernel() argument 75 losses[index] -= logf((logits[i] <= 0 ? epsilon : logits[i])) * labels[i]; in CrossEntropyKernel() 76 dlogits[i] = logits[i] - labels[i]; in CrossEntropyKernel() 82 void CrossEntropyWithSparse(const T *logits, const S *labels, const size_t batch_size, const size_t… in CrossEntropyWithSparse() argument [all …]
|
D | sparse_cross_entropy_cuda_impl.cu | 22 __global__ void CalCrossEntropyKernel(const float *logits, T *labels, const int batch_size, const i… in CalCrossEntropyKernel() argument 27 float logit = logits[i * class_num + labels[i]]; in CalCrossEntropyKernel() 41 __global__ void CalCrossEntropyGradKernel(const float *logits, T *labels, const int batch_size, con… in CalCrossEntropyGradKernel() argument 45 if (labels[i] == j) { in CalCrossEntropyGradKernel() 56 void CalCrossEntropy(const float *logits, T *labels, const int batch_size, const int class_num, flo… in CalCrossEntropy() argument 58 CalCrossEntropyKernel<<<1, 1, 0, cuda_stream>>>(logits, labels, batch_size, class_num, loss); in CalCrossEntropy() 63 void CalCrossEntropyGrad(const float *logits, T *labels, const int batch_size, const int class_num,… in CalCrossEntropyGrad() argument 65 …CalCrossEntropyGradKernel<<<GET_BLOCKS(class_num), GET_THREADS, 0, cuda_stream>>>(logits, labels, … in CalCrossEntropyGrad() 70 template void CalCrossEntropy<int>(const float *logits, int *labels, const int batch_size, const in… 72 template void CalCrossEntropy<uint64_t>(const float *logits, uint64_t *labels, const int batch_size, [all …]
|
D | sigmoid_cross_entropy_with_logits_grad_impl.cu | 20 …_ void SigmoidCrossEntropyWithLogitsGradKernel(const size_t size, const T *logits, const S *labels, in SigmoidCrossEntropyWithLogitsGradKernel() argument 24 …outputs[i] = (static_cast<T>(1.) / (static_cast<T>(1.) + exp(-logits[i])) - labels[i]) * dout_addr… in SigmoidCrossEntropyWithLogitsGradKernel() 27 outputs[i] = (exp_val / (static_cast<T>(1.) + exp_val) - labels[i]) * dout_addr[i]; in SigmoidCrossEntropyWithLogitsGradKernel() 33 void SigmoidCrossEntropyWithLogitsGrad(const size_t size, const T *logits, const S *labels, const T… in SigmoidCrossEntropyWithLogitsGrad() argument 35 …ntropyWithLogitsGradKernel<<<GET_BLOCKS(size), GET_THREADS, 0, cuda_stream>>>(size, logits, labels, in SigmoidCrossEntropyWithLogitsGrad() 40 … const float *labels, const float *dout_addr, 43 … const double *labels, const double *dout_addr,
|
D | sigmoid_cross_entropy_with_logits_impl.cu | 20 …moidCrossEntropyWithLogitsKernel(const size_t size, const T *logits, const S *labels, T *outputs) { in SigmoidCrossEntropyWithLogitsKernel() argument 24 …log1p(exp(logits[i] - static_cast<T>(2) * reverse_factor * logits[i])) - logits[i] * (labels[i] - … in SigmoidCrossEntropyWithLogitsKernel() 29 void SigmoidCrossEntropyWithLogits(const size_t size, const T *logits, const S *labels, T *outputs, in SigmoidCrossEntropyWithLogits() argument 31 …WithLogitsKernel<<<GET_BLOCKS(size), GET_THREADS, 0, cuda_stream>>>(size, logits, labels, outputs); in SigmoidCrossEntropyWithLogits() 34 …idCrossEntropyWithLogits<float, float>(const size_t size, const float *logits, const float *labels, 37 const double *labels, double *outputs,
|
/third_party/mindspore/mindspore/nn/loss/ |
D | loss.py | 103 def construct(self, logits, labels): argument 117 def construct(self, logits, labels): argument 192 def construct(self, logits, labels): argument 194 _check_is_tensor('labels', labels, self.cls_name) 195 x = self.abs(logits - labels) 257 def construct(self, logits, labels): argument 259 _check_is_tensor('labels', labels, self.cls_name) 260 x = F.square(logits - labels) 444 def construct(self, logits, labels): argument 446 _check_is_tensor('labels', labels, self.cls_name) [all …]
|
/third_party/grpc/tools/run_tests/ |
D | run_tests_matrix.py | 125 labels=[], argument 166 job.labels = [platform, config, language, iomgr_platform 167 ] + labels 178 labels=['basictests'], 187 labels=['basictests', 'multilang'], 197 labels=['basictests', 'corelang'], 207 labels=['basictests', 'multilang'], 217 labels=['basictests', 'multilang'], 226 labels=['basictests', 'multilang'], 236 labels=['basictests', 'corelang'], [all …]
|
/third_party/mindspore/tests/ut/cpp/dataset/ |
D | slice_op_test.cc | 32 std::vector<uint64_t> labels = {1, 1, 3, 2}; in TEST_F() local 34 Tensor::CreateFromVector(labels, &input); in TEST_F() 59 std::vector<uint64_t> labels = {1, 1, 3, 6, 4, 2}; in TEST_F() local 61 Tensor::CreateFromVector(labels, &input); in TEST_F() 85 std::vector<uint64_t> labels = {1, 1, 3, 2, 3, 2}; in TEST_F() local 87 Tensor::CreateFromVector(labels, TensorShape({2, 3}), &input); in TEST_F() 114 std::vector<uint64_t> labels = {1, 2, 3, 4, 5, 6, 7, 8}; in TEST_F() local 116 Tensor::CreateFromVector(labels, TensorShape({2, 2, 2}), &input); in TEST_F() 143 std::vector<uint64_t> labels = {1, 2, 3, 4, 5, 6, 7, 8}; in TEST_F() local 145 Tensor::CreateFromVector(labels, TensorShape({2, 2, 2}), &input); in TEST_F() [all …]
|
/third_party/mindspore/tests/st/networks/models/bert/src/ |
D | sample_process.py | 67 labels = {} 74 if labels.get(label): 76 labels[label][te_] = [[start, index - 1]] 79 labels[label] = {te_: [[start, index - 1]]} 84 if labels.get(label): 86 labels[label][te_] = [[start, index - 1]] 89 labels[label] = {te_: [[start, index - 1]]} 94 if labels.get(label): 96 labels[label][te_] = [[start, index - 1]] 99 labels[label] = {te_: [[start, index - 1]]} [all …]
|
/third_party/mindspore/tests/st/ops/graph_kernel/ |
D | test_sigmoid_cross_entropy_with_logits.py | 31 def construct(self, logits, labels): argument 32 return self.loss(logits, labels) 40 def construct(self, logits, labels, dout): argument 41 return self.sigmoid_cross_entropy_with_logits_grad(logits, labels, dout) 51 labels = Tensor(np.array([[0, 0, 1], 60 result_open_gk = sigmoid_cross_entropy_with_logits(logits, labels) 65 result_close_gk = sigmoid_cross_entropy_with_logits_beta(logits, labels) 77 labels = Tensor(np.array([[0, 0, 1], 87 result_open_gk = sigmoid_cross_entropy_with_logits_grad(logits, labels, dout) 92 result_close_gk = sigmoid_cross_entropy_with_logits_grad_beta(logits, labels, dout)
|
/third_party/mindspore/mindspore/explainer/ |
D | _image_classification_runner.py | 136 def _verify_ds_inputs_shape(self, sample, inputs, labels): argument 148 if len(labels.shape) > 2 and (np.array(labels.shape[1:]) > 1).sum() > 1: 151 " with length greater than 1.".format(labels.shape)) 171 inputs, labels, bboxes = sample 181 inputs, labels = sample 185 self._verify_ds_inputs_shape(sample, inputs, labels) 553 inputs, labels, _ = self._unpack_next_element(batch) 562 gt_labels = labels[idx] 797 inputs, labels, _ = self._unpack_next_element(next_element) 800 for _ in range(len(labels)): [all …]
|
/third_party/mindspore/mindspore/mindrecord/tools/ |
D | cifar10.py | 91 self.labels = None 102 labels = [] 110 labels.append(dic[b"labels"]) 118 dic["train_labels"] = np.array(labels).reshape([-1, 1]) 125 self.images, self.labels = dic["train_images"], dic["train_labels"] 126 self.Test.images, self.Test.labels = dic["test_images"], dic["test_labels"] 129 def _one_hot(self, labels, num): argument 136 size = labels.shape[0] 139 label_one_hot[i, np.squeeze(labels[i])] = 1
|
D | cifar10_to_mr.py | 93 labels = cifar10_data.labels 94 logger.info("train images label: {}".format(labels.shape)) 98 test_labels = cifar10_data.Test.labels 101 data_list = _construct_raw_data(images, labels) 130 def _construct_raw_data(images, labels): argument 146 label = np.int(labels[i][0])
|
/third_party/mesa3d/src/vulkan/util/ |
D | vk_debug_utils.c | 198 (void)util_dynarray_pop(&command_buffer->labels, VkDebugUtilsLabelEXT); in vk_common_CmdBeginDebugUtilsLabelEXT() 200 util_dynarray_append(&command_buffer->labels, VkDebugUtilsLabelEXT, in vk_common_CmdBeginDebugUtilsLabelEXT() 214 (void)util_dynarray_pop(&command_buffer->labels, VkDebugUtilsLabelEXT); in vk_common_CmdEndDebugUtilsLabelEXT() 216 (void)util_dynarray_pop(&command_buffer->labels, VkDebugUtilsLabelEXT); in vk_common_CmdEndDebugUtilsLabelEXT() 231 (void)util_dynarray_pop(&command_buffer->labels, VkDebugUtilsLabelEXT); in vk_common_CmdInsertDebugUtilsLabelEXT() 233 util_dynarray_append(&command_buffer->labels, VkDebugUtilsLabelEXT, in vk_common_CmdInsertDebugUtilsLabelEXT() 249 (void)util_dynarray_pop(&queue->labels, VkDebugUtilsLabelEXT); in vk_common_QueueBeginDebugUtilsLabelEXT() 251 util_dynarray_append(&queue->labels, VkDebugUtilsLabelEXT, *pLabelInfo); in vk_common_QueueBeginDebugUtilsLabelEXT() 264 (void)util_dynarray_pop(&queue->labels, VkDebugUtilsLabelEXT); in vk_common_QueueEndDebugUtilsLabelEXT() 266 (void)util_dynarray_pop(&queue->labels, VkDebugUtilsLabelEXT); in vk_common_QueueEndDebugUtilsLabelEXT() [all …]
|
/third_party/mindspore/tests/st/ops/ascend/ |
D | test_sparseSoftmaxCrossEntropyWithLogits.py | 32 def construct(self, features, labels): argument 33 return self.SparseSoftmaxCrossEntropyWithLogits(features, labels) 38 labels = np.random.randint(low=0, high=num_class - 1, size=labels_shape).astype(np.int32) 42 labels_reshape = np.reshape(labels, [-1]) 53 loss_res = np.reshape(loss, labels.shape) 55 return labels, logits, loss_res, bp_res 62 …labels, logits, loss_np, _ = np_sparse_softmax_cross_entropy_with_logits(labels_shape, logits_shap… 65 loss_me = SparseSoftmaxCrossEntropyWithLogits(Tensor(logits), Tensor(labels))
|
/third_party/mindspore/mindspore/lite/src/train/ |
D | train_utils.cc | 57 float CalcSparseClassificationAccuracy(T *predictions, int *labels, int batch_size, int num_of_clas… in CalcSparseClassificationAccuracy() argument 68 if (labels[b] == max_idx) accuracy += 1.0; in CalcSparseClassificationAccuracy() 82 auto labels = reinterpret_cast<int *>(input->data()); in CalculateSparseClassification() local 85 …acc = CalcSparseClassificationAccuracy(reinterpret_cast<float *>(output->data()), labels, batch, n… in CalculateSparseClassification() 88 …acc = CalcSparseClassificationAccuracy(reinterpret_cast<float16_t *>(output->data()), labels, batc… in CalculateSparseClassification() 95 float CalcOneHotClassificationAccuracy(T *predictions, float *labels, int batch_size, int num_of_cl… in CalcOneHotClassificationAccuracy() argument 100 float max_label_score = labels[num_of_classes * b]; in CalcOneHotClassificationAccuracy() 107 if (labels[num_of_classes * b + c] > max_label_score) { in CalcOneHotClassificationAccuracy() 108 max_label_score = labels[num_of_classes * b + c]; in CalcOneHotClassificationAccuracy() 126 auto labels = reinterpret_cast<float *>(input->data()); in CalculateOneHotClassification() local [all …]
|
/third_party/mindspore/tests/st/ops/ascend/test_aicpu_ops/ |
D | test_rnnt_loss.py | 27 def construct(self, acts, labels, act_lens, label_lens): argument 28 return self.rnnt_loss(acts, labels, act_lens, label_lens) 34 labels = np.array([[np.random.randint(1, V-1) for _ in range(U-1)]]).astype(np.int32) 36 label_length = np.array([len(l) for l in labels]).astype(np.int32) 38 … costs, grads = rnnt_loss(Tensor(acts), Tensor(labels), Tensor(input_length), Tensor(label_length)) 39 print(Tensor(acts), Tensor(labels), Tensor(input_length), Tensor(label_length))
|
/third_party/mindspore/tests/st/ops/ascend/test_tbe_ops/ |
D | test_sigmoid_cross_entropy_with_logits_grad.py | 33 def construct(self, features, labels): argument 34 return self.sigmoid_cross_entropy_with_logits(features, labels) 44 def construct(self, features, labels, dout): argument 45 return self.grad(self.network)(features, labels, dout) 50 labels = np.random.randn(2, 3).astype(np.float16) 54 output = net(Tensor(features), Tensor(labels), Tensor(dout))
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/mkldnn/ |
D | sparse_softmax_cross_entropy_with_logits_cpu_kernel.cc | 72 void SparseSoftmaxCrossEntropyWithLogitsCPUKernel::ForwardPostExecute(const int *labels, const floa… in ForwardPostExecute() argument 77 if (labels[i] < 0) { in ForwardPostExecute() 80 size_t label = IntToSize(labels[i]); in ForwardPostExecute() 89 void SparseSoftmaxCrossEntropyWithLogitsCPUKernel::GradPostExecute(const int *labels, const float *… in GradPostExecute() argument 93 if (labels[i] < 0) { in GradPostExecute() 96 size_t label = IntToSize(labels[i]); in GradPostExecute() 132 const auto *labels = reinterpret_cast<int *>(inputs[1]->addr); in Launch() local 136 GradPostExecute(labels, losses, output); in Launch() 138 ForwardPostExecute(labels, losses, output); in Launch()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32_grad/ |
D | sparse_softmax_cross_entropy_with_logits.cc | 33 int SparseSoftmaxCrossEntropyWithLogitsCPUKernel::ForwardPostExecute(const int *labels, const float… in ForwardPostExecute() argument 38 if (labels[i] < 0) { in ForwardPostExecute() 42 size_t label = labels[i]; in ForwardPostExecute() 54 int SparseSoftmaxCrossEntropyWithLogitsCPUKernel::GradPostExecute(const int *labels, const float *l… in GradPostExecute() argument 59 if (labels[i] < 0) { in GradPostExecute() 63 size_t label = labels[i]; in GradPostExecute() 86 auto labels = reinterpret_cast<int *>(in_tensors_.at(1)->data()); in Execute() local 87 CHECK_NULL_RETURN(labels); in Execute() 107 GradPostExecute(labels, losses, out); in Execute() 109 ForwardPostExecute(labels, losses, out); in Execute()
|
/third_party/mindspore/tests/st/networks/models/deeplabv3/src/ |
D | losses.py | 44 def construct(self, logits, labels): argument 47 labels = F.cast(labels, mstype.int32) 48 labels = self.reshape(labels, (-1,)) 49 one_hot_labels = self.one_hot(labels) 51 … weights = self.cast(self.not_equal(labels, self.ignore_label), mstype.float32) * self.loss_weight
|
/third_party/mindspore/tests/st/ops/gpu/ |
D | test_softmax_cross_entropy_with_logits_op.py | 29 def construct(self, logits, labels): argument 30 return self.loss(logits, labels) 40 labels = Tensor(np.array([[0, 0, 1], 47 output = softmax_cross_entropy_with_logits(logits, labels) 54 output = softmax_cross_entropy_with_logits(logits, labels)
|
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/fp32_grad/ |
D | softmax_crossentropy_fp32_tests.cc | 47 auto labels = new float[6 * 4]; in TEST_F() local 48 ASSERT_NE(labels, nullptr); in TEST_F() 49 std::fill(labels, labels + 6 * 4, 0.f); in TEST_F() 50 for (int i = 0; i < 6; i++) labels[i * 4 + ll_labels[i]] = 1.0; in TEST_F() 54 l_tensor.set_data(labels); in TEST_F() 108 delete[] labels; in TEST_F()
|