Home
last modified time | relevance | path

Searched refs:dilation (Results 1 – 25 of 143) sorted by relevance

123456

/third_party/mindspore/mindspore/nn/layer/
Dconv.py43 dilation, argument
79 self.dilation = dilation
86 for dilation_elem in dilation:
230 dilation=1, argument
239 self._dilation = dilation
240 dilation = twice(dilation)
248 dilation,
260 dilation=self.dilation,
282 self.dilation,
396 dilation=1, argument
[all …]
Dquant.py672 dilation=1, argument
692 self.dilation = twice(dilation)
697 for dilation_elem in self.dilation:
736 dilation=self.dilation,
780 … self.pad_mode, self.padding, self.dilation,
912 dilation=1, argument
933 self.dilation = twice(dilation)
938 for dilation_elem in self.dilation:
970 dilation=self.dilation,
1013 … self.pad_mode, self.padding, self.dilation,
[all …]
Dthor_layer.py202 padding, dilation, group, has_bias, weight_init, bias_init, transposed=False): argument
222 self.dilation = dilation
227 self.__validate_dilation(dilation)
262 def __validate_dilation(self, dilation): argument
264 if (not isinstance(dilation[0], int)) or (not isinstance(dilation[1], int)) or \
265 …isinstance(dilation[0], bool) or isinstance(dilation[1], bool) or dilation[0] < 1 or dilation[1] <…
370 pad_mode='same', padding=0, dilation=1, group=1, has_bias=False, argument
375 self._dilation = dilation
376 dilation = twice(dilation)
378 … stride, pad_mode, padding, dilation, group, has_bias, weight_init, bias_init)
[all …]
/third_party/mindspore/mindspore/nn/probability/bnn_layers/
Dconv_variational.py37 dilation=1, argument
46 dilation = twice(dilation)
54 dilation,
71 self.dilation = dilation
96 dilation=self.dilation,
113 … self.dilation, self.group, self.weight_posterior.mean, self.weight_posterior.untransformed_std,
240 dilation=1, argument
254 dilation=dilation,
/third_party/mindspore/tests/st/networks/models/deeplabv3/src/backbone/
Dresnet_deeplab.py28 dilation=1, argument
38 dilation=dilation,
50 dilation=1, argument
60 dilation=dilation,
76 dilation=1, argument
87 dilation=dilation,
104 dilation=1, argument
114 dilation=dilation,
216 dilation, argument
226 self.dilation = dilation
[all …]
/third_party/mindspore/tests/vm_impl/
Dvm_me.py232 dilation=1, groups=1, padding_mode='zeros'): argument
247 validator.check_value_type('dilation', dilation, (int, tuple))
248 if isinstance(dilation, int):
249 dilation = (dilation, dilation)
250 elif len(dilation) == 4:
251 dilation = (dilation[2], dilation[3])
252 if len(dilation) != 2 or (not isinstance(dilation[0], int)) or \
253 (not isinstance(dilation[1], int)) or \
254 dilation[0] < 1 or dilation[1] < 1:
257 dilation_h = dilation[0]
[all …]
/third_party/mindspore/mindspore/lite/src/ops/populate/
Dconv2d_populate.cc43 auto dilation = value->dilation(); in PopulateConvParameter() local
56 if (stride == nullptr || dilation == nullptr) { in PopulateConvParameter()
61 if (stride->size() < kMinShapeSizeTwo || dilation->size() < kMinShapeSizeTwo) { in PopulateConvParameter()
62 MS_LOG(ERROR) << "stride size: " << stride->size() << ", dilation size: " << dilation->size(); in PopulateConvParameter()
91 param->dilation_h_ = static_cast<int>(*(dilation->begin())); in PopulateConvParameter()
92 param->dilation_w_ = static_cast<int>(*(dilation->begin() + 1)); in PopulateConvParameter()
Ddeconv2d_populate.cc44 auto dilation = value->dilation(); in PopulateDeconvParameter() local
68 if (stride == nullptr || dilation == nullptr) { in PopulateDeconvParameter()
73 if (stride->size() < kMinShapeSizeTwo || dilation->size() < kMinShapeSizeTwo) { in PopulateDeconvParameter()
74 MS_LOG(ERROR) << "stride size: " << stride->size() << ", dilation size: " << dilation->size(); in PopulateDeconvParameter()
104 param->dilation_h_ = static_cast<int>(*(dilation->begin())); in PopulateDeconvParameter()
105 param->dilation_w_ = static_cast<int>(*(dilation->begin() + 1)); in PopulateDeconvParameter()
Dadder_populate.cc43 auto dilation = value->dilation(); in PopulateAdderParameter() local
44 if (kernel_size == nullptr || stride == nullptr || pad_list == nullptr || dilation == nullptr) { in PopulateAdderParameter()
50 pad_list->size() < kMinShapeSizeFour || dilation->size() < kMinShapeSizeTwo) { in PopulateAdderParameter()
64 param->dilation_h_ = static_cast<int>(*(dilation->begin())); in PopulateAdderParameter()
65 param->dilation_w_ = static_cast<int>(*(dilation->begin() + 1)); in PopulateAdderParameter()
/third_party/mindspore/tests/ut/cpp/python_input/gtest_input/pynative/
Dops_test.py23 def im2col(img, filter_h, filter_w, stride=1, pad=0, dilation=1): argument
37 …out_h = (height + pad_top + pad_bottom - filter_h - (filter_h - 1) * (dilation[2] - 1)) // stride[…
38 …out_w = (width + pad_left + pad_right - filter_w - (filter_w - 1) * (dilation[3] - 1)) // stride[3…
55 dilation=1, groups=1, padding_mode='zeros'): argument
70 …out_h = 1 + int((x_h + pad_top + pad_bottom - filter_h - (filter_h - 1) * (dilation[2] - 1)) / str…
71 …out_w = 1 + int((x_w + pad_left + pad_right - filter_w - (filter_w - 1) * (dilation[3] - 1)) / str…
72 col = im2col(x, filter_h, filter_w, stride, pad, dilation)
89 out = conv2d(x, weight, bias, self.stride, self.pad, self.dilation)
/third_party/mindspore/mindspore/lite/tools/converter/parser/onnx/
Donnx_conv_base_parser.cc34 STATUS ParseDilations(std::vector<int64_t> *dilation, bool *conv1d, const onnx::AttributeProto &onn… in ParseDilations() argument
35 MS_ASSERT(dilation != nullptr && conv1d != nullptr); in ParseDilations()
39 dilation->push_back(1); in ParseDilations()
40 dilation->push_back(onnx_node_attr.ints(0)); in ParseDilations()
43 dilation->push_back(onnx_node_attr.ints(0)); in ParseDilations()
44 dilation->push_back(onnx_node_attr.ints(1)); in ParseDilations()
134 … std::vector<int64_t> *strides, std::vector<int64_t> *dilation, in ParseVecAttr() argument
138 MS_ASSERT(dilation != nullptr); in ParseVecAttr()
143 auto ret = ParseDilations(dilation, conv1d, onnx_node_attr); in ParseVecAttr()
/third_party/mindspore/mindspore/core/ops/fusion/
Dconv2d_transpose_fusion.cc24 … const std::vector<int64_t> &stride, const std::vector<int64_t> &dilation, in Init() argument
34 set_dilation(dilation); in Init()
51 void Conv2dTransposeFusion::set_dilation(const std::vector<int64_t> &dilation) { in set_dilation() argument
53 …(void)CheckAndConvertUtils::CheckInteger(kDilation, SizeToLong(dilation.size()), kEqual, dilation_… in set_dilation()
54 for (int64_t item : dilation) { in set_dilation()
57 (void)AddAttr(kDilation, MakeValue(dilation)); in set_dilation()
/third_party/mindspore/tests/ut/python/nn/
Dtest_conv.py38 dilation=1, argument
50 dilation,
116 Net(3, 1, 4, dilation=-1)
136 dilation=1, argument
148 dilation,
196 net = NetConv2dTranspose(3, 64, 4, stride=2, dilation=2, pad_mode='same', weight_init='normal')
202 net = NetConv2dTranspose(3, 64, 4, stride=2, dilation=2, pad_mode='pad', weight_init='normal')
/third_party/mindspore/mindspore/core/ops/
Dconv2d.cc74 const std::vector<int64_t> &dilation, const int64_t &pad_mode, in Conv2DPadFunction() argument
81 …static_cast<int64_t>(std::ceil(((x_h * 1.0) - static_cast<double>(dilation[0] * (kernel[0] - 1))) … in Conv2DPadFunction()
88 …static_cast<int64_t>(std::ceil(((x_w * 1.0) - static_cast<double>(dilation[1] * (kernel[1] - 1))) … in Conv2DPadFunction()
104 …int64_t pad_needed_h = (output_hw->at(0) - 1) * stride[0] + dilation[0] * (kernel[0] - 1) + 1 - x_… in Conv2DPadFunction()
116 …int64_t pad_needed_w = (output_hw->at(1) - 1) * stride[1] + dilation[1] * (kernel[1] - 1) + 1 - x_… in Conv2DPadFunction()
127 …x_h * 1) + pad_list->at(0) + pad_list->at(1) - kernel[0] - ((kernel[0] - 1) * (dilation[0] - 1))) / in Conv2DPadFunction()
135 … kernel[1] - ((kernel[1] - 1) * (dilation[1] - 1))) / in Conv2DPadFunction()
204 …std::vector<int64_t> dilation = CheckAttrIntOrTuple(primitive->GetAttr("dilation"), start_index, d… in Conv2dInferShape() local
214 …n(&output_hw, &pad_list, x_shape[h_axis], x_shape[w_axis], kernel_size, stride, dilation, pad_mode, in Conv2dInferShape()
217 dilation, pad_mode, padding, true); in Conv2dInferShape()
[all …]
Dadder.cc24 const std::vector<int64_t> &dilation, const int64_t group, const Format &format) { in Init() argument
31 set_dilation(dilation); in Init()
83 …der::set_dilation(const std::vector<int64_t> &dilation) { (void)this->AddAttr(kDilation, MakeValue… in set_dilation() argument
Dconv2d_transpose.cc30 … const std::vector<int64_t> &stride, const std::vector<int64_t> &dilation, int64_t group, in Init() argument
39 set_dilation(dilation); in Init()
73 void Conv2DTranspose::set_dilation(const std::vector<int64_t> &dilation) { in set_dilation() argument
75 …(void)CheckAndConvertUtils::CheckInteger(kDilation, SizeToLong(dilation.size()), kGreaterEqual, di… in set_dilation()
77 (void)AddAttr(kDilation, MakeValue(dilation)); in set_dilation()
/third_party/mindspore/mindspore/lite/examples/export_models/models/
Demoji_model.py47 … self.c1 = MS.nn.Conv2d(1, 32, (3, 3), (1, 1), pad_mode='pad', padding=1, dilation=(1, 1), group=1,
50 …self.c2 = MS.nn.Conv2d(32, 64, (3, 3), (1, 1), pad_mode='pad', padding=1, dilation=(1, 1), group=1,
53 …self.c3 = MS.nn.Conv2d(64, 128, (3, 3), (1, 1), pad_mode='pad', padding=1, dilation=(1, 1), group=…
56 …self.c4 = MS.nn.Conv2d(128, 256, (3, 3), (1, 1), pad_mode='pad', padding=1, dilation=(1, 1), group…
60 …self.c5 = MS.nn.Conv2d(256, wayc, (3, 3), (1, 1), pad_mode='pad', padding=1, dilation=(1, 1), grou…
/third_party/mindspore/mindspore/ccsrc/cxx_api/ops/
Dops.cc20 …std::vector<int> &pad, const std::vector<int> &stride, const std::vector<int> &dilation, int group) in Conv2D() argument
28 dilation(dilation), in Conv2D()
/third_party/mindspore/mindspore/lite/tools/converter/parser/caffe/
Dcaffe_deconvolution_parser.cc53 std::vector<int64_t> dilation(2, 0); in Parse() local
54 if (CaffeConvBaseParser::ParseDilations(convParam, &dilation) != RET_OK) { in Parse()
57 prim->set_dilation({dilation[0], dilation[1]}); in Parse()
Dcaffe_conv_base_parser.cc100 std::vector<int64_t> *dilation) { in ParseDilations() argument
101 MSLITE_CHECK_PTR(dilation); in ParseDilations()
108 …vec.push_back((num_dilation_dims == 0) ? 1 : convParam.dilation((num_dilation_dims == 1) ? 0 : i)); in ParseDilations()
110 (*dilation)[0] = vec[0]; in ParseDilations()
111 (*dilation)[1] = vec[1]; in ParseDilations()
/third_party/mindspore/mindspore/lite/src/delegate/tensorrt/op/
Dconvolution_tensorrt.cc135 auto dilation = conv_op->dilation(); in SetAttributes() local
136 if (dilation != nullptr) { in SetAttributes()
137 auto dilation_val = std::vector<int64_t>(dilation->begin(), dilation->end()); in SetAttributes()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/cl/
Ddepthwise_conv2d.cl20 … int2 stride, int2 padding, int2 dilation, int4 src_size, int4 dst_size,
32 int y_c = y_offset + ky * dilation.y;
35 int x_c = x_offset + kx * dilation.x;
53 … int2 stride, int2 padding, int2 dilation, int4 src_size, int4 dst_size,
84 … int2 stride, int2 padding, int2 dilation, int4 src_size, int4 dst_size,
104 int y_c = y_offset + ky * dilation.y;
109 int x_c = x_offset + kx * dilation.x;
186 … int2 stride, int2 padding, int2 dilation, int4 src_size, int4 dst_size,
204 int y_c = y_offset + ky * dilation.y;
209 int x_c = x_offset + kx * dilation.x;
[all …]
/third_party/ffmpeg/libavfilter/dnn/
Ddnn_backend_native_layer_conv2d.c55 conv_params->dilation = (int32_t)avio_rl32(model_file_context); in ff_dnn_load_layer_conv2d()
128 …_params->padding_method == VALID) ? (conv_params->kernel_size - 1) / 2 * conv_params->dilation : 0; in dnn_execute_layer_conv2d_thread()
148 … int y_pos = CLAMP_TO_EDGE(y + (kernel_y - radius) * conv_params->dilation, height); in dnn_execute_layer_conv2d_thread()
149 … int x_pos = CLAMP_TO_EDGE(x + (kernel_x - radius) * conv_params->dilation, width); in dnn_execute_layer_conv2d_thread()
152 int y_pos = y + (kernel_y - radius) * conv_params->dilation; in dnn_execute_layer_conv2d_thread()
153 int x_pos = x + (kernel_x - radius) * conv_params->dilation; in dnn_execute_layer_conv2d_thread()
202 …_params->padding_method == VALID) ? (conv_params->kernel_size - 1) / 2 * conv_params->dilation : 0; in ff_dnn_execute_layer_conv2d()
/third_party/mindspore/mindspore/_extends/graph_kernel/expanders/
Dconv2d.py63 dilation = self.attrs['dilation']
65 if h == 1 and w == 1 and stride == [1, 1, 1, 1] and dilation == [1, 1, 1, 1] and \
86 dilation = self.attrs['dilation']
87 check_nd(dilation, 4)
88 if dilation != [1, 1, 1, 1]:
90 "dilation should be all 1, but got {}".format(dilation))
/third_party/mindspore/tests/st/ops/cpu/
Dtest_conv_op.py42 dilation=1,
86 dilation=(1, 1),
186 dilation=1,
308 …it__(self, in_channels, out_channels, kernel_size, pad_mode='pad', padding=0, stride=1, dilation=1, argument
317 dilation=dilation,

123456