forked from mindspore-Ecosystem/mindspore
commit
0f08b98903
|
@ -42,7 +42,13 @@ OpParameter *PopulateAdderParameter(const void *prim) {
|
|||
auto pad_list = value->pad_list();
|
||||
auto dilation = value->dilation();
|
||||
if (kernel_size == nullptr || stride == nullptr || pad_list == nullptr || dilation == nullptr) {
|
||||
MS_LOG(ERROR) << "nullptr";
|
||||
MS_LOG(ERROR) << "exist attr is nullptr";
|
||||
free(param);
|
||||
return nullptr;
|
||||
}
|
||||
if (kernel_size->size() < kMinShapeSizeTwo || stride->size() < kMinShapeSizeTwo ||
|
||||
pad_list->size() < kMinShapeSizeFour || dilation->size() < kMinShapeSizeTwo) {
|
||||
MS_LOG(ERROR) << "exist attr size is invalid.";
|
||||
free(param);
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -47,6 +47,8 @@ OpParameter *PopulateConstantOfShapeParameter(const void *prim) {
|
|||
param->data_type_ = static_cast<int>(value->data_type());
|
||||
if (val.empty() || val.size() > 1) {
|
||||
MS_LOG(ERROR) << "The value of constant of shape is empty or more than 1.";
|
||||
free(param);
|
||||
return nullptr;
|
||||
} else {
|
||||
switch (param->data_type_) {
|
||||
case kNumberTypeFloat32:
|
||||
|
|
Loading…
Reference in New Issue