/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/opencl/ |
D | one_hot_tests.cc | 35 float on_value = 1; in TEST_F() local 47 {{}, &on_value, CONST_SCALAR, kNumberTypeFloat32}, in TEST_F() 56 float on_value = 1; in TEST_F() local 68 {{}, &on_value, CONST_SCALAR, kNumberTypeFloat32}, in TEST_F() 77 float on_value = 1; in TEST_F() local 91 {{}, &on_value, CONST_SCALAR, kNumberTypeFloat32}, in TEST_F() 100 float on_value = 1; in TEST_F() local 114 {{}, &on_value, CONST_SCALAR, kNumberTypeFloat32}, in TEST_F() 123 float on_value = 2; in TEST_F() local 135 {{}, &on_value, CONST_SCALAR, kNumberTypeFloat32}, in TEST_F() [all …]
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/cl/ |
D | one_hot.cl | 32 … int4 out_shape, int depth, float on_value, float off_value, int C, int support_neg_index) { 49 SET_ON_OR_OFF_VALUE(result.x, N, indices_int[0], on_value, off_value); 52 SET_ON_OR_OFF_VALUE(result.y, N, indices_int[1], on_value, off_value); 55 SET_ON_OR_OFF_VALUE(result.z, N, indices_int[2], on_value, off_value); 58 SET_ON_OR_OFF_VALUE(result.w, N, indices_int[3], on_value, off_value); 64 … int4 out_shape, int depth, float on_value, float off_value, int C, int support_neg_index) { 81 SET_ON_OR_OFF_VALUE(result.x, H, indices_int[0], on_value, off_value); 84 SET_ON_OR_OFF_VALUE(result.y, H, indices_int[1], on_value, off_value); 87 SET_ON_OR_OFF_VALUE(result.z, H, indices_int[2], on_value, off_value); 90 SET_ON_OR_OFF_VALUE(result.w, H, indices_int[3], on_value, off_value); [all …]
|
/third_party/mindspore/tests/st/auto_parallel/ |
D | onehot_model_parallel.py | 49 def __init__(self, axis=-1, depth=1, on_value=1.0, off_value=0.0, strategy=None): argument 56 self.on_value = Tensor(on_value, ms.float32) 63 x = self.onehot(indices, self.depth, self.on_value, self.off_value) 102 def __init__(self, batch_size, classes, on_value=1.0, off_value=0.0, axis=None, strategy=None): argument 107 self.on_value = on_value 115 on_value=self.on_value, 124 on_value=self.on_value, 140 on_value=1.000000, 150 on_value=1.000000,
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/ |
D | one_hot_impl.cu | 20 __global__ void OneHotKernel(size_t size, const S *indices, size_t depth, const T *on_value, const … in OneHotKernel() argument 22 T on_v = *on_value; in OneHotKernel() 41 void OneHot(const S *indices, size_t depth, const T *on_value, const T *off_value, size_t left_dim_… in OneHot() argument 44 …OneHotKernel<<<GET_BLOCKS(size), GET_THREADS, 0, cuda_stream>>>(size, indices, depth, on_value, of… in OneHot() 48 template void OneHot<float, int>(const int *indices, size_t depth, const float *on_value, const flo… 50 template void OneHot<half, int>(const int *indices, size_t depth, const half *on_value, const half … 52 template void OneHot<float, int64_t>(const int64_t *indices, size_t depth, const float *on_value, 55 template void OneHot<half, int64_t>(const int64_t *indices, size_t depth, const half *on_value, con…
|
D | one_hot_impl.cuh | 20 void OneHot(const S *indices, size_t depth_, const T *on_value, const T *off_value, size_t left_dim…
|
/third_party/mindspore/tests/ut/cpp/python_input/gtest_input/pre_activate/ |
D | convert_const_input_test.py | 35 on_value = Tensor(1.0, mstype.float32) variable 103 return onehot1(x, 2, on_value, off_value) 107 res = backend_onehot1(x, on_value, off_value) 118 return onehot2(x, 2, on_value, off_value) 122 res = backend_onehot2(x, depth, on_value, off_value) 133 return onehot2(x, 2, on_value, off_value) 137 return make_tuple(backend_onehot2(x, on_value, off_value))
|
/third_party/mindspore/tests/st/ops/cpu/ |
D | test_one_hot_op.py | 30 self.on_value = 2.0 34 self.one_hot_1 = nn.OneHot(-1, self.depth_1, self.on_value, self.off_value) 37 self.one_hot_2 = nn.OneHot(0, self.depth_1, self.on_value, self.off_value) 38 self.one_hot_3 = nn.OneHot(0, self.depth_2, self.on_value, self.off_value) 39 self.one_hot_4 = nn.OneHot(1, self.depth_1, self.on_value, self.off_value)
|
/third_party/mindspore/tests/st/ops/gpu/ |
D | test_one_hot_op.py | 30 self.on_value = 2.0 34 self.one_hot_1 = nn.OneHot(-1, self.depth_1, self.on_value, self.off_value) 37 self.one_hot_2 = nn.OneHot(0, self.depth_1, self.on_value, self.off_value) 38 self.one_hot_3 = nn.OneHot(0, self.depth_2, self.on_value, self.off_value) 39 self.one_hot_4 = nn.OneHot(1, self.depth_1, self.on_value, self.off_value)
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/base/ |
D | one_hot_base.cc | 185 const auto *on_value = reinterpret_cast<float *>(on_value_tensor->data()); in InitOnOffValueForFourInputs() local 186 if (on_value == nullptr) { in InitOnOffValueForFourInputs() 189 this->on_value_ = *on_value; in InitOnOffValueForFourInputs() 192 const auto *on_value = reinterpret_cast<float16_t *>(on_value_tensor->data()); in InitOnOffValueForFourInputs() local 193 if (on_value == nullptr) { in InitOnOffValueForFourInputs() 196 this->on_value_ = *on_value; in InitOnOffValueForFourInputs()
|
/third_party/mindspore/tests/ut/cpp/ops/ |
D | test_ops_one_hot.cc | 41 …auto on_value = TensorConstructUtils::CreateOnesTensor(kNumberTypeFloat32, std::vector<int64_t>{1}… in TEST_F() local 45 MS_EXCEPTION_IF_NULL(on_value); in TEST_F() 48 …one_hot->Infer({indice->ToAbstract(), depth->ToAbstract(), on_value->ToAbstract(), off_value->ToAb… in TEST_F()
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/ |
D | one_hot_cpu_kernel.cc | 56 auto on_value = reinterpret_cast<float *>(inputs[1]->addr)[0]; in Launch() local 61 auto task = [this, &indices, &on_value, &off_value, &output](size_t start, size_t end) { in Launch() 68 output[output_index] = on_value; in Launch()
|
/third_party/mindspore/tests/ut/python/parallel/ |
D | test_auto_parallel_onehot.py | 84 self.on_value = Tensor(1.0, ms.float32) 90 out1 = self.one_hot(b, 64, self.on_value, self.off_value) 112 self.on_value = Tensor(1.0, ms.float32) 119 out1 = self.one_hot(b, 64, self.on_value, self.off_value)
|
D | test_onehot_2dim.py | 31 self.on_value = Tensor(1.0, ms.float32) 39 output = self.onehot(output, self.depth, self.on_value, self.off_value)
|
D | test_one_dev.py | 80 self.on_value = Tensor(1.0, mstype.float32) 93 labels = self.one_hot(labels, F.shape(logits)[-1], self.on_value, self.off_value)
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/ |
D | one_hot_fp32.c | 20 int OneHotToFp32(const int *indices, float on_value, float off_value, float *output, in OneHotToFp32() argument 44 *output_ptr = on_value; in OneHotToFp32()
|
D | one_hot_fp32.h | 29 int OneHotToFp32(const int *indices, float on_value, float off_value, float *output,
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp16/ |
D | one_hot_fp16.c | 19 int OneHotToFp16(const int *indices, float16_t on_value, float16_t off_value, float16_t *output, in OneHotToFp16() argument 43 *output_ptr = on_value; in OneHotToFp16()
|
D | one_hot_fp16.h | 29 int OneHotToFp16(const int *indices, float16_t on_value, float16_t off_value, float16_t *output,
|
/third_party/mindspore/tests/st/networks/models/resnet50/src/ |
D | CrossEntropySmooth.py | 30 self.on_value = Tensor(1.0 - smooth_factor, mstype.float32) 36 label = self.onehot(label, F.shape(logit)[1], self.on_value, self.off_value)
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/ |
D | one_hot_infer.c | 32 const TensorC *on_value = inputs[2]; in OneHotInferShape() local 38 SetDataTypeFormat(output, on_value); in OneHotInferShape()
|
/third_party/mindspore/tests/st/quantization/resnet50_quant/ |
D | utils.py | 94 self.on_value = Tensor(1.0 - smooth_factor, mstype.float32) 102 logit)[1], self.on_value, self.off_value)
|
/third_party/mindspore/tests/st/quantization/mobilenetv2_quant/ |
D | utils.py | 108 self.on_value = Tensor(1.0 - smooth_factor, mstype.float32) 117 self.on_value, self.off_value)
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/arrays/ |
D | one_hot_gpu_kernel.h | 44 const T *on_value = GetDeviceAddress<T>(inputs, 1); in Launch() local 47 OneHot(indices, depth_, on_value, off_value, left_dim_size_, right_dim_size_, output, in Launch()
|
/third_party/mindspore/tests/st/networks/models/bert/src/ |
D | CRF.py | 71 self.on_value = Tensor(1.0, dtype=mstype.float32) 92 onehot_label = self.onehot(label, self.target_size, self.on_value, self.off_value) 94 labels = self.onehot(labels, self.target_size, self.on_value, self.off_value)
|
/third_party/mindspore/tests/st/fl/cross_silo_faster_rcnn/src/FasterRcnn/ |
D | rcnn.py | 120 self.on_value = Tensor(1.0, mstype.float32) 146 labels = self.onehot(labels, self.num_classes, self.on_value, self.off_value) 165 …bbox_weights = self.cast(self.onehot(bbox_weights, self.num_classes, self.on_value, self.off_value…
|