Browse Source

Modify Conv2D's attr offset_a

tags/v1.1.1
liuyang_655 5 years ago
parent
commit
69c9b7e3d1
3 changed files with 0 additions and 3 deletions
  1. +0
    -1
      mindspore/ccsrc/backend/optimizer/ascend/mindir/conv2d_unify_mindir.cc
  2. +0
    -1
      mindspore/core/ops/conv2d.cc
  3. +0
    -1
      mindspore/ops/operations/nn_ops.py

+ 0
- 1
mindspore/ccsrc/backend/optimizer/ascend/mindir/conv2d_unify_mindir.cc View File

@@ -221,7 +221,6 @@ void SetConv2DAttrs(const CNodePtr &conv2d, const CNodePtr &depth_conv) {
SetCommonAttrs(conv2d, depth_conv);
AnfAlgo::CopyNodeAttr(kAttrInputNames, conv2d, depth_conv);
AnfAlgo::CopyNodeAttr(kAttrStride, conv2d, depth_conv);
AnfAlgo::CopyNodeAttr(kAttrOffsetA, conv2d, depth_conv);
}

void SetConv2DBackpropInputAttrs(const CNodePtr &conv2d_backin, const CNodePtr &depth_conv_backin) {


+ 0
- 1
mindspore/core/ops/conv2d.cc View File

@@ -121,7 +121,6 @@ TypePtr Conv2dInferType(const PrimitivePtr &prim, const std::vector<AbstractBase
void Conv2D::Init(int64_t out_channel, const std::vector<int64_t> &kernel_size, int64_t mode, const PadMode &pad_mode,
const std::vector<int64_t> &pad, const std::vector<int64_t> &stride,
const std::vector<int64_t> &dilation, int64_t group, const Format &format) {
AddAttr(kOffsetA, MakeValue(static_cast<int64_t>(0)));
set_kernel_size(kernel_size);
set_stride(stride);
set_dilation(dilation);


+ 0
- 1
mindspore/ops/operations/nn_ops.py View File

@@ -1200,7 +1200,6 @@ class Conv2D(PrimitiveWithInfer):
self.out_channel = validator.check_positive_int(out_channel, 'out_channel', self.name)
self.group = validator.check_positive_int(group, 'group', self.name)
self.add_prim_attr('groups', self.group)
self.add_prim_attr('offset_a', 0)

def infer_shape(self, x_shape, w_shape, b_shape=None):
x_shape_norm = x_shape if self.format == "NCHW" else (x_shape[0], x_shape[3], x_shape[1], x_shape[2])


Loading…
Cancel
Save