Home
last modified time | relevance | path

Searched refs:input_scale (Results 1 – 20 of 20) sorted by relevance

/third_party/mindspore/mindspore/_extends/graph_kernel/expanders/
Dbatchnorm.py31 input_scale = self.inputs[1]
35 epsilon_v = graph_builder.value(input_scale.dtype, self.attrs['epsilon'])
39 …if input_x.dtype == "float16" and input_scale.dtype == "float32" and input_offset.dtype == "float3…
55 input_scale = graph_builder.emit(
56 … 'Reshape', [input_scale], attrs={'shape': ExpandDims.infer_shape(input_scale.shape, [-1, -1])})
60 x_sub_mul = graph_builder.emit('Mul', [input_scale, x_sub])
75 input_scale = self.inputs[1]
79 epsilon_v = graph_builder.value(input_scale.dtype, self.attrs['epsilon'])
89 num_rec_v = graph_builder.value(input_scale.dtype, num_rec)
109 scalar_one_v = graph_builder.value(input_scale.dtype, scalar_one)
[all …]
Dbatchnorm_grad.py32 input_scale = self.inputs[2]
50 num_rec_v = graph_builder.value(input_scale.dtype, num_rec)
57 epsilon_v = graph_builder.value(input_scale.dtype, self.attrs['epsilon'])
61 scalar_one_v = graph_builder.value(input_scale.dtype, scalar_one)
70 input_scale = graph_builder.emit(
71 … 'Reshape', [input_scale], attrs={'shape': ExpandDims.infer_shape(input_scale.shape, [-1, -1])})
92 gamma_mul = graph_builder.emit('Mul', [input_scale, tmp_abc_add])
95 y_scale = graph_builder.emit('Mul', [input_scale, input_dy])
/third_party/mindspore/tests/st/ops/graph_kernel/
Dtest_batchnorm_grad.py28 …def construct(self, input_dy, input_x, input_scale, input_save_mean, input_save_inv_variance, inpu… argument
30 input_dy, input_x, input_scale, input_save_mean, input_save_inv_variance, input_reverse)
33 def get_output(input_dy, input_x, input_scale, input_save_mean, input_save_inv_variance, input_reve… argument
37 …output = net(input_dy, input_x, input_scale, input_save_mean, input_save_inv_variance, input_rever…
43 input_scale = Tensor(np.random.normal(5, 1, [2,]).astype(np.float32))
49 …input_dy, input_x, input_scale, input_save_mean, input_save_inv_variance, input_reverse, True, Fal…
51 …input_dy, input_x, input_scale, input_save_mean, input_save_inv_variance, input_reverse, True, Tru…
60 input_scale = Tensor(np.random.normal(5, 1, [2,]).astype(np.float32))
66 …input_dy, input_x, input_scale, input_save_mean, input_save_inv_variance, input_reverse, False, Fa…
68 …input_dy, input_x, input_scale, input_save_mean, input_save_inv_variance, input_reverse, False, Tr…
Dtest_batchnorm.py25 def __init__(self, input_scale, input_bias, input_mean, input_variance, is_training): argument
28 self.scale = Parameter(input_scale, name='scale')
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/int8/
Dsigmoid_int8_coder.cc28 void CalculateTableList(int8_t *table, const float input_scale, const int32_t input_zp, const float… in CalculateTableList() argument
34 const float real_input_value = input_scale * (i - input_zp); in CalculateTableList()
47 const float input_scale = input_tensor_->quant_params().at(0).scale; in Prepare() local
51 CalculateTableList(table_list_, input_scale, input_zp, output_scale, output_zp); in Prepare()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/int8/
Dsigmoid_int8.cc33 void CalculateTableList(int8_t *table, const float input_scale, const int32_t input_zp, const float… in CalculateTableList() argument
39 const float real_input_value = input_scale * (i - input_zp); in CalculateTableList()
51 const float input_scale = input->quant_params().front().scale; in Init() local
55 CalculateTableList(table_list_, input_scale, input_zp, output_scale, output_zp); in Init()
Dhswish_int8.cc37 quant_arg_.input_scale = input->quant_params().front().scale; in Init()
42 …const float output_multiplier = (1.0f / 128.0f) * quant_arg_.input_scale / quant_arg_.output_scale; in Init()
49 const float relu6_multiplier = (1.0f / 128.0f) * quant_arg_.input_scale / (3.0f / 32768.0f); in Init()
Dscale_int8.cc178 auto input_scale = input->quant_params().front().scale; in InitQuantArgs() local
186 const double input_output_multiplier = input_scale * scale_scale / output_scale; in InitQuantArgs()
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/
Dconv2d_base_coder.cc30 auto input_scale = static_cast<double>(conv_quant_arg_->input_quant_args_[0].scale_); in SetQuantArgs() local
41 const double effective_output_scale = input_scale * filter_scale / output_scale; in SetQuantArgs()
50 const double effective_output_scale = input_scale * filter_scale / output_scale; in SetQuantArgs()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/
Dpower_int8.c20 double input_scale = param->quant_arg_.in_args_.scale_; in PowerInt8() local
29 float input_val = input_scale * (input[i] - input_zp); in PowerInt8()
38 float input_val = input_scale * (input[i] - input_zp); in PowerInt8()
Dunsqueeze_int8.c26 float input_scale = para_->quant_arg.in_quant_args_.scale_; in Int8Unsqueeze() local
30 output_ptr[i] = output_zp + round(1 / output_scale * input_scale * (input_ptr[i] - input_zp)); in Int8Unsqueeze()
Dscale_int8.c23 int32x4_t input_scale = vmulq_s32(scaled_input0, scaled_input1); in ClacSumHalfWordMul2() local
25 …SaturatingRoundingDoublingHighMulInt32x4(vmulq_s32(input_scale, left_shift_out_vec), output_multip… in ClacSumHalfWordMul2()
39 int32x4_t input_scale = vmulq_s32(scaled_input0, scaled_input1); in ClacSumHalfWordMul3() local
41 …SaturatingRoundingDoublingHighMulInt32x4(vmulq_s32(input_scale, left_shift_out_vec), output_multip… in ClacSumHalfWordMul3()
Dslice_int8.c21 double input_scale = param->quant_arg_.in_args_.scale_; in SliceInt8() local
47 if (input_scale == output_scale && input_zp == output_zp) { in SliceInt8()
Dhswish_int8.h25 double input_scale; member
Dpooling_int8.c35 float input_scale = pooling_param->quant_args_[0][0].scale_; in AvgPoolingInt8() local
39 double real_multiplier = input_scale / output_scale; in AvgPoolingInt8()
292 float input_scale = pooling_param->quant_args_[0][0].scale_; in MaxPoolingInt8() local
296 double real_multiplier = input_scale / output_scale; in MaxPoolingInt8()
338 float input_scale = pooling_param->quant_args_[0][0].scale_; in MaxPoolingWithQuantInt8() local
342 double real_multiplier = input_scale / output_scale; in MaxPoolingWithQuantInt8()
Dmul_int8.c22 int32x4_t input_scale = vmull_s16(scaled_input0, scaled_input1); in ClacSumHalfWordMul() local
23 …int32x4_t raw_sum = vqrdmulhq_s32(vmulq_s32(input_scale, left_shift_out_vec), output_multiplier_ve… in ClacSumHalfWordMul()
Darithmetic_self_int8.c208 int32x4_t input_scale = vmulq_s32(scaled_input, scaled_input); in ClacSumHalfWord() local
210 …SaturatingRoundingDoublingHighMulInt32x4(vmulq_s32(input_scale, left_shift_out_vec), output_multip… in ClacSumHalfWord()
/third_party/ffmpeg/libavfilter/
Daf_amix.c174 float *input_scale; /**< mixing scale factor for each input */ member
235 s->input_scale[i] = FFABS(s->weights[i]); in calculate_scales()
237 s->input_scale[i] = 1.0f / s->scale_norm[i] * FFSIGN(s->weights[i]); in calculate_scales()
239 s->input_scale[i] = 0.0f; in calculate_scales()
277 s->input_scale = av_mallocz_array(s->nb_inputs, sizeof(*s->input_scale)); in config_output()
279 if (!s->input_scale || !s->scale_norm) in config_output()
369 s->input_scale[i], plane_size); in output_frame()
375 s->input_scale[i], plane_size); in output_frame()
588 av_freep(&s->input_scale); in uninit()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16_grad/
Dbn_fp16_grad.cc78 auto *input_scale = in_tensors_.at(kNumInputDim_2); in DoExecute() local
108 float16_t *scale = reinterpret_cast<float16_t *>(input_scale->data()); in DoExecute()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32_grad/
Dbn_grad.cc78 auto *input_scale = in_tensors_.at(2); in Execute() local
110 float *scale = reinterpret_cast<float *>(input_scale->MutableData()); in Execute()