From: @YeFeng_24 Reviewed-by: @hangangqiang,@zhanghaibo5,@hangangqiang Signed-off-by: @hangangqiangtags/v1.2.0-rc1
| @@ -41,6 +41,6 @@ int RandomStandardNormalInferShape(const TensorC *const *inputs, size_t inputs_s | |||||
| } | } | ||||
| SetShapeArray(outputs[0], output_shape, output_shape_size); | SetShapeArray(outputs[0], output_shape, output_shape_size); | ||||
| outputs[0]->data_type_ = kNumberTypeFloat32; | outputs[0]->data_type_ = kNumberTypeFloat32; | ||||
| outputs[0]->format_ = Format_NHWC; | |||||
| outputs[0]->format_ = inputs[0]->format_; | |||||
| return NNACL_OK; | return NNACL_OK; | ||||
| } | } | ||||
| @@ -742,6 +742,10 @@ schema::PrimitiveT *ZerosLikePrimitiveCreator(const AnfNodePtr &node) { | |||||
| auto ms_primc = GetValueNode<std::shared_ptr<mindspore::ops::ZerosLike>>(node); | auto ms_primc = GetValueNode<std::shared_ptr<mindspore::ops::ZerosLike>>(node); | ||||
| return ms_primc != nullptr ? ops::MSOp2SchemaOp(ms_primc.get()) : nullptr; | return ms_primc != nullptr ? ops::MSOp2SchemaOp(ms_primc.get()) : nullptr; | ||||
| } | } | ||||
| schema::PrimitiveT *WhilePrimitiveCreator(const AnfNodePtr &node) { | |||||
| auto ms_primc = GetValueNode<std::shared_ptr<mindspore::ops::While>>(node); | |||||
| return ms_primc != nullptr ? ops::MSOp2SchemaOp(ms_primc.get()) : nullptr; | |||||
| } | |||||
| RegistryMSOps g_absPrimitiveCreatorRegistry("Abs", AbsPrimitiveCreator); | RegistryMSOps g_absPrimitiveCreatorRegistry("Abs", AbsPrimitiveCreator); | ||||
| RegistryMSOps g_absGradPrimitiveCreatorRegistry("AbsGrad", AbsGradPrimitiveCreator); | RegistryMSOps g_absGradPrimitiveCreatorRegistry("AbsGrad", AbsGradPrimitiveCreator); | ||||
| @@ -952,6 +956,7 @@ RegistryMSOps g_unsortedSegmentSumPrimitiveCreatorRegistry("UnsortedSegmentSum", | |||||
| RegistryMSOps g_unsqueezePrimitiveCreatorRegistry("Unsqueeze", UnsqueezePrimitiveCreator); | RegistryMSOps g_unsqueezePrimitiveCreatorRegistry("Unsqueeze", UnsqueezePrimitiveCreator); | ||||
| RegistryMSOps g_wherePrimitiveCreatorRegistry("Where", WherePrimitiveCreator); | RegistryMSOps g_wherePrimitiveCreatorRegistry("Where", WherePrimitiveCreator); | ||||
| RegistryMSOps g_zerosLikePrimitiveCreatorRegistry("ZerosLike", ZerosLikePrimitiveCreator); | RegistryMSOps g_zerosLikePrimitiveCreatorRegistry("ZerosLike", ZerosLikePrimitiveCreator); | ||||
| RegistryMSOps g_whilePrimitiveCreatorRegistry("While", WhilePrimitiveCreator); | |||||
| } // namespace lite | } // namespace lite | ||||
| } // namespace mindspore | } // namespace mindspore | ||||
| @@ -282,7 +282,7 @@ STATUS FormatTransPass::ChangeOpAxis(schema::MetaGraphT *graph, const std::uniqu | |||||
| return RET_NOT_SUPPORT; | return RET_NOT_SUPPORT; | ||||
| } | } | ||||
| } else { | } else { | ||||
| MS_LOG(ERROR) << "change op axis only support 4 dims"; | |||||
| MS_LOG(DEBUG) << "change op axis only support 4 dims"; | |||||
| return RET_NOT_SUPPORT; | return RET_NOT_SUPPORT; | ||||
| } | } | ||||
| } | } | ||||
| @@ -184,7 +184,7 @@ STATUS TFModelParser::ConvertConstVariant(const tensorflow::TensorProto &tensor_ | |||||
| } | } | ||||
| auto &variant = tensor_proto.variant_val(0); | auto &variant = tensor_proto.variant_val(0); | ||||
| if (variant.type_name() != "tensorflow::TensorList" || variant.tensors_size() <= 0) { | if (variant.type_name() != "tensorflow::TensorList" || variant.tensors_size() <= 0) { | ||||
| MS_LOG(ERROR) << "Only nonempty TensorList type is supported now"; | |||||
| MS_LOG(DEBUG) << "Only nonempty TensorList type is supported now"; | |||||
| } | } | ||||
| auto descriptor = variant.GetMetadata().descriptor; | auto descriptor = variant.GetMetadata().descriptor; | ||||
| auto reflection = variant.GetMetadata().reflection; | auto reflection = variant.GetMetadata().reflection; | ||||
| @@ -388,7 +388,7 @@ bool InferShapePass::Run(const FuncGraphPtr &func_graph) { | |||||
| } | } | ||||
| auto prim_t = lite::GetPrimitiveT(cnode->input(0)); | auto prim_t = lite::GetPrimitiveT(cnode->input(0)); | ||||
| if (prim_t == nullptr) { | if (prim_t == nullptr) { | ||||
| MS_LOG(ERROR) << "prim_t is nullptr"; | |||||
| MS_LOG(DEBUG) << "prim_t is nullptr"; | |||||
| FreeTensors(&input_tensors); | FreeTensors(&input_tensors); | ||||
| FreeTensors(&output_tensors); | FreeTensors(&output_tensors); | ||||
| return false; | return false; | ||||