Browse Source

slice tensor no originshape

tags/v1.1.0
wangwenhua1@huawei.com 4 years ago
parent
commit
fd39b87146
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      ge/host_kernels/slice_kernel.cc

+ 3
- 2
ge/host_kernels/slice_kernel.cc View File

@@ -99,8 +99,9 @@ Status SliceKernel::Compute(const OpDescPtr attr, const std::vector<ConstGeTenso
stride_vec.push_back(1);
}
// construct tensorDesc
ge::GeShape output_shape(output_dims);
GeTensorDesc output_tensor_desc(output_shape, FORMAT_NCHW, data_type);
atuo attr_output_tensor_desc = attr->GetOutputDesc(0);
GeTensorDesc output_tensor_desc(attr_output_tensor_desc);
output_tensor_desc.SetShape(output_dims);
GeTensorPtr output_ptr = MakeShared<GeTensor>(output_tensor_desc);
if (output_ptr == nullptr) {
GELOGW("make_shared ge::GeTensor failed, node name %s.", attr->GetName().c_str());


Loading…
Cancel
Save