Home
last modified time | relevance | path

Searched refs:out_channel (Results 1 – 25 of 139) sorted by relevance

123456

/third_party/mindspore/tests/st/networks/models/resnet50/src_thor/
Dresnet.py25 def _conv_variance_scaling_initializer(in_channel, out_channel, kernel_size): argument
31 …weight = truncnorm(-2, 2, loc=mu, scale=sigma).rvs(out_channel * in_channel * kernel_size * kernel…
32 weight = np.reshape(weight, (out_channel, in_channel, kernel_size, kernel_size))
40 def _conv3x3(in_channel, out_channel, stride=1, use_se=False): argument
42 weight = _conv_variance_scaling_initializer(in_channel, out_channel, kernel_size=3)
44 weight_shape = (out_channel, in_channel, 3, 3)
46 return nn.Conv2d(in_channel, out_channel,
50 def _conv1x1(in_channel, out_channel, stride=1, use_se=False): argument
52 weight = _conv_variance_scaling_initializer(in_channel, out_channel, kernel_size=1)
54 weight_shape = (out_channel, in_channel, 1, 1)
[all …]
/third_party/mindspore/tests/st/ps/multi_full_ps/
Dresnet.py27 def _conv3x3(in_channel, out_channel, stride=1): argument
28 weight_shape = (out_channel, in_channel, 3, 3)
30 return nn.Conv2d(in_channel, out_channel,
34 def _conv1x1(in_channel, out_channel, stride=1): argument
35 weight_shape = (out_channel, in_channel, 1, 1)
37 return nn.Conv2d(in_channel, out_channel,
41 def _conv7x7(in_channel, out_channel, stride=1): argument
42 weight_shape = (out_channel, in_channel, 7, 7)
44 return nn.Conv2d(in_channel, out_channel,
58 def _fc(in_channel, out_channel): argument
[all …]
/third_party/mindspore/tests/ut/python/model/
Dresnet.py27 def _conv3x3(in_channel, out_channel, stride=1): argument
28 weight_shape = (out_channel, in_channel, 3, 3)
30 return nn.Conv2d(in_channel, out_channel,
34 def _conv1x1(in_channel, out_channel, stride=1): argument
35 weight_shape = (out_channel, in_channel, 1, 1)
37 return nn.Conv2d(in_channel, out_channel,
41 def _conv7x7(in_channel, out_channel, stride=1): argument
42 weight_shape = (out_channel, in_channel, 7, 7)
44 return nn.Conv2d(in_channel, out_channel,
58 def _fc(in_channel, out_channel): argument
[all …]
/third_party/mindspore/tests/st/networks/models/resnet50/src/
Dresnet.py27 def _conv3x3(in_channel, out_channel, stride=1): argument
28 weight_shape = (out_channel, in_channel, 3, 3)
30 return nn.Conv2d(in_channel, out_channel,
34 def _conv1x1(in_channel, out_channel, stride=1): argument
35 weight_shape = (out_channel, in_channel, 1, 1)
37 return nn.Conv2d(in_channel, out_channel,
41 def _conv7x7(in_channel, out_channel, stride=1): argument
42 weight_shape = (out_channel, in_channel, 7, 7)
44 return nn.Conv2d(in_channel, out_channel,
58 def _fc(in_channel, out_channel): argument
[all …]
/third_party/mindspore/tests/st/quantization/resnet50_quant/
Dresnet_quant_manual.py36 def _conv3x3(in_channel, out_channel, stride=1): argument
37 weight_shape = (out_channel, in_channel, 3, 3)
39 return nn.Conv2d(in_channel, out_channel,
43 def _conv1x1(in_channel, out_channel, stride=1): argument
44 weight_shape = (out_channel, in_channel, 1, 1)
46 return nn.Conv2d(in_channel, out_channel,
50 def _conv7x7(in_channel, out_channel, stride=1): argument
51 weight_shape = (out_channel, in_channel, 7, 7)
53 return nn.Conv2d(in_channel, out_channel,
67 def _fc(in_channel, out_channel): argument
[all …]
/third_party/mindspore/tests/ut/python/parallel/
Dtest_conv2d.py26 … def __init__(self, conv2d_weight, out_channel, kernel_size, pad_mode, stride, dilation=1, group=1, argument
29 self.conv2d = P.Conv2D(out_channel=out_channel, kernel_size=kernel_size,
63 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, strategy1=strategy1, strat…
71 net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=(2, 2, 1, 1),
81 net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, dilation=2,
90 net = Net(_w4, out_channel=8, kernel_size=2, pad_mode="same", stride=1, group=2,
99 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, strategy1=strategy1, strat…
107 net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, dilation=2,
117 net = Net(_w4, out_channel=8, kernel_size=2, pad_mode="same", stride=1, group=2,
127 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=2, strategy1=strategy1, strat…
[all …]
Dtest_resizebilinear.py28 def __init__(self, conv2d_weight, out_channel, kernel_size, pad_mode, stride, argument
31 self.conv2d = P.Conv2D(out_channel=out_channel, kernel_size=kernel_size,
46 def __init__(self, conv2d_weight, out_channel, kernel_size, pad_mode, stride, argument
49 self.conv2d = P.Conv2D(out_channel=out_channel, kernel_size=kernel_size,
63 def __init__(self, conv2d_weight, out_channel, kernel_size, pad_mode, stride, argument
66 self.conv2d = P.Conv2D(out_channel=out_channel, kernel_size=kernel_size,
94 net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1,
103 net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1,
112 net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1,
119 net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1)
[all …]
Dtest_maxpool_avgpool.py26 …def __init__(self, conv2d_weight, out_channel, kernel_size, pad_mode, stride, pool_kernel_size, po… argument
29 self.conv2d = P.Conv2D(out_channel=out_channel, kernel_size=kernel_size,
41 …def __init__(self, conv2d_weight, out_channel, kernel_size, pad_mode, stride, pool_kernel_size, po… argument
44 self.conv2d = P.Conv2D(out_channel=out_channel, kernel_size=kernel_size,
74 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, pool_kernel_size=2, pool_s…
83 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, pool_kernel_size=2, pool_s…
92 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, pool_kernel_size=2, pool_s…
99 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, pool_kernel_size=2, pool_s…
107 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, pool_kernel_size=2, pool_s…
117 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, pool_kernel_size=2, pool_s…
[all …]
Dtest_conv2d_transpose.py26 def __init__(self, conv2d_weight, out_channel, kernel_size, pad_mode, stride, argument
29 self.conv2d_transpose = P.Conv2DTranspose(out_channel=out_channel, kernel_size=kernel_size,
41 def __init__(self, conv2d_weight, out_channel, kernel_size, pad_mode, stride, argument
44 self.conv2d_transpose = P.Conv2DTranspose(out_channel=out_channel, kernel_size=kernel_size,
76 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, strategy1=strategy1, strat…
84 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, strategy1=strategy1, strat…
92 net = Net2(_w2, out_channel=8, kernel_size=(4, 4), pad_mode="same", stride=2,
101 net = Net2(_w2, out_channel=8, kernel_size=(4, 4), pad_mode="same", stride=2,
110 net = Net2(_w1, out_channel=8, kernel_size=(2, 2), pad_mode="same", stride=2,
119 net = Net2(_w1, out_channel=8, kernel_size=(2, 2), pad_mode="pad", stride=2,
[all …]
Dtest_batchnorm.py25 def __init__(self, conv2d_weight, out_channel, kernel_size, pad_mode, stride, argument
28 self.conv2d = P.Conv2D(out_channel=out_channel, kernel_size=kernel_size,
58 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, strategy1=strategy1, strat…
66 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, strategy1=strategy1, strat…
74 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=2, strategy1=strategy1, strat…
Dtest_print.py25 def __init__(self, conv2d_weight, out_channel, kernel_size, pad_mode, stride, argument
28 self.conv2d = P.Conv2D(out_channel=out_channel, kernel_size=kernel_size,
61 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, strategy1=strategy1, strat…
70 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=1, strategy1=strategy1, strat…
79 …net = Net(_w1, out_channel=8, kernel_size=2, pad_mode="same", stride=2, strategy1=strategy1, strat…
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/
Dconv_int8.c23 int out_channel = conv_param->output_channel_; in ConvInt8() local
33 up_round_oc = UP_ROUND(out_channel, C2NUM); in ConvInt8()
37 up_round_oc = UP_ROUND(out_channel, C8NUM); in ConvInt8()
40 up_round_oc = UP_ROUND(out_channel, C4NUM); in ConvInt8()
55 int out_batch_offset = b * out_channel * conv_param->output_h_ * conv_param->output_w_; in ConvInt8()
66 int out_offset = thread_id * tile_n * out_channel + out_batch_offset; in ConvInt8()
70 …gemm_input, packed_weight, gemm_output, real_cal_num, out_channel, unit_size, tmp_input_sum, bias_… in ConvInt8()
73 …->conv_quant_arg_.left_shift_, conv_param->conv_quant_arg_.right_shift_, out_channel, per_channel); in ConvInt8()
76 …mul_func(gemm_input, packed_weight, gemm_output, real_cal_num, out_channel, unit_size, out_channel, in ConvInt8()
83 UP_ROUND(out_channel, C4NUM), unit_size, tmp_input_sum, bias_data, in ConvInt8()
[all …]
/third_party/mindspore/tests/ut/python/communication/
Dtest_comm.py48 def __init__(self, input_channel, out_channel, op): argument
50 self.dense = Dense(input_channel, out_channel)
63 def __init__(self, input_channel, out_channel): argument
65 self.dense = Dense(input_channel, out_channel)
77 def __init__(self, input_channel, out_channel): argument
79 self.dense = Dense(input_channel, out_channel)
98 def __init__(self, input_channel, out_channel, op): argument
100 self.dense = Dense(input_channel, out_channel)
113 def __init__(self, input_channel, out_channel): argument
115 self.dense = Dense(input_channel, out_channel)
[all …]
/third_party/mindspore/tests/st/model_zoo_tests/yolov3_darknet53/src/
Ddarknet.py138 out_channel=out_channels[0])
142 out_channel=out_channels[1])
146 out_channel=out_channels[2])
150 out_channel=out_channels[3])
154 out_channel=out_channels[4])
156 def _make_layer(self, block, layer_num, in_channel, out_channel): argument
169 darkblk = block(in_channel, out_channel)
173 darkblk = block(out_channel, out_channel)
/third_party/mindspore/tests/ut/python/pynative_mode/ge/ops/
Dtest_conv.py28 def get_me_conv_output(input_data, weight, in_channel, out_channel, kernel_size, argument
35 def __init__(self, weight, in_channel, out_channel, kernel_size, argument
39 out_channels=out_channel,
50 net = Net(weight, in_channel, out_channel, kernel_size, stride, padding, has_bias, bias)
61 out_channel=6, kernel_size=7, stride=7, padding=0)
72 out_channel=6, kernel_size=7, stride=7, padding=0)
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/
Dconvolution_fp32.cc84 size_t out_channel = filter_tensor->Batch(); in Init() local
85 size_t oc_block_num = UP_ROUND(out_channel, OC_BLOCK); in Init()
177 int32_t out_channel = filter_tensor->Batch(); in PackWeight() local
178 if (out_channel < 0) { in PackWeight()
190 …r(reinterpret_cast<float *>(origin_weight), reinterpret_cast<float *>(packed_weight_), out_channel, in PackWeight()
193 …r(reinterpret_cast<float *>(origin_weight), reinterpret_cast<float *>(packed_weight_), out_channel, in PackWeight()
196 …r(reinterpret_cast<float *>(origin_weight), reinterpret_cast<float *>(packed_weight_), out_channel, in PackWeight()
204 size_t out_channel = filter_tensor->Batch(); in MallocWeightBiasData() local
206 conv_param_->output_channel_ = out_channel; in MallocWeightBiasData()
207 size_t oc_block_num = UP_ROUND(out_channel, OC_BLOCK); in MallocWeightBiasData()
Dconvolution_winograd_fp32.cc110 int out_channel = filter_tensor->Batch(); in Init() local
112 input_unit_ * input_unit_ * in_channel * UP_ROUND(out_channel, oc_block_) * sizeof(float); in Init()
195 int out_channel = filter_tensor->Batch(); in MallocWeightBiasData() local
196 if (out_channel < 0) { in MallocWeightBiasData()
201 conv_param_->output_channel_ = out_channel; in MallocWeightBiasData()
205 input_unit_ * input_unit_ * in_channel * UP_ROUND(out_channel, oc_block_) * sizeof(float); in MallocWeightBiasData()
233 size_t new_bias_size = UP_ROUND(out_channel, C4NUM) * sizeof(float); in MallocWeightBiasData()
/third_party/mindspore/mindspore/lite/tools/optimizer/graph/
Dupdate_conv2d_param_pass.cc26 int64_t out_channel) { in SetConvAttr() argument
40 prim->AddAttr(ops::kOutChannel, MakeValue(out_channel)); in SetConvAttr()
83 int64_t out_channel = shape[0]; in UpdateConv2DAttr() local
87 prim->AddAttr(ops::kGroup, MakeValue(is_depth_wise ? out_channel : 1)); in UpdateConv2DAttr()
92 std::swap(in_channel, out_channel); in UpdateConv2DAttr()
97 out_channel *= group; in UpdateConv2DAttr()
100 SetConvAttr(prim, kernel_size, in_channel, out_channel); in UpdateConv2DAttr()
/third_party/mindspore/tests/st/model_zoo_tests/yolov3/src/
Dyolov3.py54 out_channel, argument
65 out_channel,
71 nn.BatchNorm2d(out_channel, momentum=momentum),
174 out_channel=out_channels[0],
179 out_channel=out_channels[1],
184 out_channel=out_channels[2],
189 out_channel=out_channels[3],
200 def _make_layer(self, block, layer_num, in_channel, out_channel, stride): argument
219 resblk = block(in_channel, out_channel, stride=stride)
223 resblk = block(out_channel, out_channel, stride=1)
[all …]
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16/
Dconvolution_fp16.cc33 int out_channel = filter_tensor->Batch(); in PackWeight() local
37 RowMajor2Col8MajorFp16(weight_origin, reinterpret_cast<float16_t *>(packed_weight_), out_channel, in PackWeight()
44 int out_channel = filter_tensor->Batch(); in MallocWeightBiasData() local
46 conv_param_->output_channel_ = out_channel; in MallocWeightBiasData()
47 int oc8 = UP_ROUND(out_channel, col_tile_); in MallocWeightBiasData()
103 int out_channel = filter_tensor->Batch(); in Init() local
104 int oc8 = UP_ROUND(out_channel, col_tile_); in Init()
/third_party/mindspore/tests/st/fl/cross_silo_faster_rcnn/src/FasterRcnn/
Dresnet.py95 out_channel=out_channels[0],
102 out_channel=out_channels[1],
109 out_channel=out_channels[2],
116 out_channel=out_channels[3],
121 …def _make_layer(self, block, layer_num, in_channel, out_channel, stride, training=False, weights_u… argument
125 if stride != 1 or in_channel != out_channel:
128 out_channel,
136 …resblk = block(out_channel, out_channel, stride=1, training=training, weights_update=weights_updat…
Dresnet50v1.py95 out_channel=out_channels[0],
102 out_channel=out_channels[1],
109 out_channel=out_channels[2],
116 out_channel=out_channels[3],
121 …def _make_layer(self, block, layer_num, in_channel, out_channel, stride, training=False, weights_u… argument
125 if stride != 1 or in_channel != out_channel:
128 out_channel,
136 …resblk = block(out_channel, out_channel, stride=1, training=training, weights_update=weights_updat…
/third_party/mindspore/tests/st/gnn/
Daggregator.py256 out_channel, argument
264 self.out_channel = Validator.check_positive_int(out_channel)
270 out_channels=self.out_channel,
274 in_channels=self.out_channel,
277 in_channels=self.out_channel,
284 self.bias = Parameter(initializer('zeros', self.out_channel), name='bias')
287 if in_channel != out_channel:
291 out_channels=self.out_channel)
/third_party/mindspore/mindspore/lite/tools/optimizer/fusion/
Dconv_biasadd_fusion.cc45 int out_channel) { in FuseBias() argument
51 if (out_channel <= 0) { in FuseBias()
59 fusion_bias->resize(static_cast<size_t>(out_channel), 0); in FuseBias()
62 conv_bias.data_.size() != static_cast<size_t>(out_channel) * sizeof(float)) { in FuseBias()
137 auto out_channel = GetValue<int64_t>(prim_conv->GetAttr(ops::kOutChannel)); in CheckCanFusion() local
148 return out_channel % element_num == 0; in CheckCanFusion()
189 int out_channel = GetValue<int64_t>(prim->GetAttr(ops::kOutChannel)); in DoFuison() local
191 if (!FuseBias(add_bias_info, conv_bias_info, &fusion_data, out_channel)) { in DoFuison()
196 …AddNewBiasNode(fusion_data.data(), func_graph, out_channel, static_cast<TypeId>(add_bias_info.data… in DoFuison()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/
Dadder_fp32.c55 int out_channel = conv_param->output_channel_; in AdderFp32() local
70 int out_batch_offset = b * out_channel * output_count; in AdderFp32()
81 int out_offset = thread_id * cal_num * out_channel + out_batch_offset; in AdderFp32()
89 out_channel, out_channel); in AdderFp32()

123456