/third_party/mindspore/mindspore/nn/metrics/ |
D | roc.py | 71 def __init__(self, class_num=None, pos_label=None): argument 73 …self.class_num = class_num if class_num is None else validator.check_value_type("class_num", class… 84 def _precision_recall_curve_update(self, y_pred, y, class_num, pos_label): argument 92 if class_num is not None and class_num != 1: 95 class_num = 1 106 if class_num != y_pred.shape[1]: 108 'predictions.'.format(class_num, y_pred.shape[1])) 109 y_pred = y_pred.transpose(0, 1).reshape(class_num, -1).transpose(0, 1) 112 return y_pred, y, class_num, pos_label 130 …y_pred, y, class_num, pos_label = self._precision_recall_curve_update(y_pred, y, self.class_num, s… [all …]
|
D | precision.py | 108 class_num = self._class_num 110 if y.max() + 1 > class_num: 112 format(class_num, y.max() + 1)) 113 y = np.eye(class_num)[y.reshape(-1)] 115 y_pred = np.eye(class_num)[indices] 117 y_pred = y_pred.swapaxes(1, 0).reshape(class_num, -1) 118 y = y.swapaxes(1, 0).reshape(class_num, -1)
|
D | recall.py | 108 class_num = self._class_num 110 if y.max() + 1 > class_num: 112 format(class_num, y.max() + 1)) 113 y = np.eye(class_num)[y.reshape(-1)] 115 y_pred = np.eye(class_num)[indices] 117 y_pred = y_pred.swapaxes(1, 0).reshape(class_num, -1) 118 y = y.swapaxes(1, 0).reshape(class_num, -1)
|
D | fbeta.py | 87 class_num = self._class_num 89 if y.max() + 1 > class_num: 91 format(class_num, y.max() + 1)) 92 y = np.eye(class_num)[y.reshape(-1)] 94 y_pred = np.eye(class_num)[indices]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/ |
D | sparse_cross_entropy_cuda_impl.cu | 22 …id CalCrossEntropyKernel(const float *logits, T *labels, const int batch_size, const int class_num, in CalCrossEntropyKernel() argument 27 float logit = logits[i * class_num + labels[i]]; in CalCrossEntropyKernel() 41 …alCrossEntropyGradKernel(const float *logits, T *labels, const int batch_size, const int class_num, in CalCrossEntropyGradKernel() argument 44 … for (int j = blockIdx.x * blockDim.x + threadIdx.x; j < class_num; j += blockDim.x * gridDim.x) { in CalCrossEntropyGradKernel() 46 grad[i * class_num + j] = (logits[i * class_num + j] - 1) / batch_size; in CalCrossEntropyGradKernel() 48 grad[i * class_num + j] = logits[i * class_num + j] / batch_size; 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() [all …]
|
D | cross_entropy_impl.cu | 25 const size_t class_num, T *loss) { in CrossEntropyWithSparseKernel() argument 29 T logit = logits[i * class_num + labels[i]]; in CrossEntropyWithSparseKernel() 41 const size_t class_num, T *loss) { in LargeBatchCrossEntropyWithSparseKernel() argument 45 T logit = logits[index * class_num + labels[index]]; in LargeBatchCrossEntropyWithSparseKernel() 55 const size_t class_num, T *grad) { in CrossEntropyGradWithSparseKernel() argument 56 for (size_t i = 0; i < class_num; i++) { in CrossEntropyGradWithSparseKernel() 59 grad[j * class_num + i] = (logits[j * class_num + i] - 1) / batch_size; in CrossEntropyGradWithSparseKernel() 61 grad[j * class_num + i] = logits[j * class_num + i] / batch_size; in CrossEntropyGradWithSparseKernel() 68 …ossEntropyKernel(const T *logits, const S *labels, const size_t batch_size, const size_t class_num, in CrossEntropyKernel() argument 72 const int start = index * class_num; in CrossEntropyKernel() [all …]
|
D | cross_entropy_impl.cuh | 26 …hSparse(const T *logits, const S *labels, const size_t batch_size, const size_t class_num, T *loss, 30 …pyGradWithSparse(const T *logits, const S *labels, const size_t batch_size, const size_t class_num, 34 void CrossEntropy(const T *logits, const S *labels, const size_t batch_size, const size_t class_num…
|
D | sparse_cross_entropy_cuda_impl.cuh | 23 void CalCrossEntropy(const float *logits, T *labels, const int batch_size, const int class_num, flo… 27 void CalCrossEntropyGrad(const float *logits, T *labels, const int batch_size, const int class_num,…
|
/third_party/mindspore/tests/st/quantization/resnet50_quant/ |
D | test_resnet50_quant.py | 74 net = resnet50_quant(class_num=config.class_num) 81 smooth_factor=config.label_smooth_factor, num_classes=config.class_num)
|
D | resnet_quant_manual.py | 307 def resnet50_quant(class_num=10): argument 325 class_num) 328 def resnet101_quant(class_num=1001): argument 346 class_num)
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/ |
D | non_max_suppression_fp32.cc | 112 …NonMaxSuppressionCPUKernel::Run_Selecte(bool simple_out, int box_num, int batch_num, int class_num, in Run_Selecte() argument 119 int batch_offset = i * class_num * box_num; in Run_Selecte() 120 for (auto j = 0; j < class_num; ++j) { in Run_Selecte() 233 int class_num = score_dims.at(kClassIndex); in Run() local 246 auto ret = Run_Selecte(simple_out, box_num, batch_num, class_num, scores_data, box_data); in Run()
|
D | non_max_suppression_fp32.h | 44 …int Run_Selecte(bool simple_out, int box_num, int batch_num, int class_num, float *scores_data, fl…
|
/third_party/mindspore/tests/st/ps/multi_full_ps/ |
D | resnet.py | 244 def resnet50(class_num=10): argument 262 class_num) 265 def resnet101(class_num=1001): argument 283 class_num)
|
/third_party/mindspore/tests/ut/python/model/ |
D | resnet.py | 244 def resnet50(class_num=10): argument 262 class_num) 264 def resnet101(class_num=1001): argument 282 class_num)
|
/third_party/mindspore/tests/st/networks/models/resnet50/src/ |
D | resnet.py | 244 def resnet50(class_num=10): argument 262 class_num) 264 def resnet101(class_num=1001): argument 282 class_num)
|
/third_party/mindspore/tests/st/networks/models/resnet50/src_thor/ |
D | resnet.py | 335 def resnet50(class_num=10): argument 353 class_num) 355 def se_resnet50(class_num=1001): argument 373 class_num, 376 def resnet101(class_num=1001): argument 394 class_num)
|
/third_party/mindspore/tests/ut/python/metrics/ |
D | test_roc.py | 42 metric = ROC(class_num=4) 84 ROC(class_num="class_num")
|
/third_party/mindspore/tests/st/gnn/gcn/ |
D | test_gcn.py | 51 class_num = label_onehot.shape[1] 53 gcn_net = GCN(config, input_dim, class_num)
|
/third_party/mindspore/tests/st/networks/models/resnet50/ |
D | test_resnet50_imagenet.py | 147 net = resnet50(class_num=config.class_num) 157 num_classes=config.class_num) 244 net = resnet50_thor(thor_config.class_num) 251 num_classes=thor_config.class_num)
|
/third_party/mindspore/mindspore/lite/examples/export_models/models/ |
D | resnet_train_export.py | 28 n = resnet50(class_num=10)
|
/third_party/mindspore/tests/ut/python/communication/ |
D | test_data_parallel_resnet.py | 297 class_num = 10 variable 302 dataset_shapes = ((32, 3, 224, 224), (32, class_num))
|
/third_party/mindspore/tests/ut/python/parallel/ |
D | test_auto_parallel_resnet_sharding_propagation2.py | 212 def resnet50(class_num=10, matmul_stra=None, squeeze_stra=None): argument 218 class_num,
|
D | test_auto_parallel_resnet_sharding_propagation.py | 213 def resnet50(class_num=10, matmul_stra=None, squeeze_stra=None): argument 219 class_num,
|
D | test_auto_parallel_resnet.py | 214 def resnet50(class_num=10): argument 220 class_num)
|
/third_party/mindspore/tests/st/auto_parallel/ |
D | resnet50_expand_loss.py | 239 def resnet50(class_num=10): argument 245 class_num)
|