Browse Source

fix some operator bugs

tags/v1.1.0
zengxianglong 5 years ago
parent
commit
ff6a891198
2 changed files with 2 additions and 3 deletions
  1. +1
    -2
      mindspore/lite/src/runtime/kernel/arm/fp32/cast.cc
  2. +1
    -1
      mindspore/lite/tools/converter/parser/onnx/onnx_conv_parser.cc

+ 1
- 2
mindspore/lite/src/runtime/kernel/arm/fp32/cast.cc View File

@@ -83,8 +83,7 @@ int CastCPUKernel::DoCast(int thread_id) {
} else if (input_data_type == kNumberTypeInt32 && output_data_type == kNumberTypeInt64) {
Int32ToInt64(reinterpret_cast<int32_t *>(input->data_c()) + offset,
reinterpret_cast<int64_t *>(output_data) + offset, data_num);
} else if (input_data_type == kNumberTypeInt32 &&
(output_data_type == kNumberTypeInt32 || output_data_type == kNumberTypeInt64)) {
} else if (input_data_type == kNumberTypeInt32 && output_data_type == kNumberTypeInt32) {
memcpy(reinterpret_cast<int32_t *>(output_data) + offset, reinterpret_cast<int32_t *>(input->data_c()) + offset,
data_num * sizeof(int32_t));
} else {


+ 1
- 1
mindspore/lite/tools/converter/parser/onnx/onnx_conv_parser.cc View File

@@ -172,7 +172,7 @@ STATUS OnnxConvParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::Nod
attr->activationType = schema::ActivationType_NO_ACTIVATION;
}

if (attr->group > kSingleGrounp) {
if (attr->group > kSingleGrounp && attr->group == attr->channelIn) {
if (!ParseGroupConvolution(attr, op)) {
MS_LOG(ERROR) << "Convert Convolution to Depthwise failed";
return RET_ERROR;


Loading…
Cancel
Save