forked from mindspore-Ecosystem/mindspore
fix some operator bugs
This commit is contained in:
parent
c2c2b65010
commit
ff6a891198
|
@ -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 {
|
||||
|
|
|
@ -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…
Reference in New Issue