forked from mindspore-Ecosystem/mindspore
fix bug
This commit is contained in:
parent
befc209480
commit
a0ef03cc0e
2
build.sh
2
build.sh
|
@ -618,10 +618,12 @@ build_lite()
|
|||
|
||||
if [[ "${COMPILE_RET}" -ne 0 ]]; then
|
||||
echo "---------------- mindspore lite: build failed ----------------"
|
||||
exit 1
|
||||
else
|
||||
mv ${BASEPATH}/output/tmp/*.tar.gz* ${BASEPATH}/output/
|
||||
rm -rf ${BASEPATH}/output/tmp/
|
||||
echo "---------------- mindspore lite: build success ----------------"
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,15 @@ namespace lite {
|
|||
/// \brief Global method to get a version string.
|
||||
///
|
||||
/// \return The version string of MindSpore Lite.
|
||||
#ifndef MS_VERSION_MAJOY
|
||||
#define MS_VERSION_MAJOY 0
|
||||
#endif
|
||||
#ifndef MS_VERSION_MINOR
|
||||
#define MS_VERSION_MINOR 7
|
||||
#endif
|
||||
#ifndef MS_VERSION_REVISION
|
||||
#define MS_VERSION_REVISION 0
|
||||
#endif
|
||||
std::string Version() {
|
||||
return "MindSpore Lite " + std::to_string(MS_VERSION_MAJOY) + "." + std::to_string(MS_VERSION_MINOR) + "." +
|
||||
std::to_string(MS_VERSION_REVISION);
|
||||
|
|
|
@ -54,7 +54,7 @@ int Unsqueeze::InferShape(std::vector<tensor::Tensor *> inputs_, std::vector<ten
|
|||
return RET_OK;
|
||||
}
|
||||
|
||||
auto dims = GetAxis().data();
|
||||
auto dims = GetAxis();
|
||||
auto in_shape = input->shape();
|
||||
auto in_rank = in_shape.size();
|
||||
auto dim_rank = GetAxis().size();
|
||||
|
|
|
@ -30,7 +30,7 @@ using mindspore::schema::PrimitiveType_DepthwiseConv2D;
|
|||
namespace mindspore::kernel {
|
||||
ConvolutionDepthwiseCPUKernel::~ConvolutionDepthwiseCPUKernel() {
|
||||
if (packed_weight_ != nullptr) {
|
||||
delete packed_weight_;
|
||||
free(packed_weight_);
|
||||
packed_weight_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,7 +142,10 @@ void AnfExporter::SetGraphoutputIndex(const CNodePtr &cnode, const std::unique_p
|
|||
MS_ASSERT(nullptr != return_node);
|
||||
for (size_t i = 1; i < cnode->inputs().size(); i++) {
|
||||
auto input_node = cnode->input(i);
|
||||
if (input_node->isa<CNode>()) {
|
||||
if (input_node == nullptr) {
|
||||
MS_LOG(ERROR) << "output node is nullptr";
|
||||
return;
|
||||
} else if (input_node->isa<CNode>()) {
|
||||
auto ret = ConvertInputCNode(input_node, return_node);
|
||||
if (ret != RET_OK) {
|
||||
MS_LOG(ERROR) << "obtain outputs failed";
|
||||
|
@ -175,7 +178,10 @@ schema::MetaGraphT *AnfExporter::Export(const FuncGraphPtr &func_graph) {
|
|||
RemoveIfMakeTuple(cnode);
|
||||
|
||||
auto node = std::make_unique<schema::CNodeT>();
|
||||
|
||||
if (node == nullptr) {
|
||||
MS_LOG(ERROR) << "object failed to be constructed";
|
||||
return nullptr;
|
||||
}
|
||||
if (primT->value.type == schema::PrimitiveType_Return) {
|
||||
node->name = "return_node";
|
||||
SetGraphoutputIndex(cnode, meta_graphT, node.get());
|
||||
|
|
|
@ -28,4 +28,5 @@ add_library(caffe_parser_mid OBJECT
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/caffe_inspector.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/caffe_interp_parser.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/caffe_permute_parser.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/caffe_tile_parser.cc)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/caffe_tile_parser.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/caffe_tanh_parser.cc)
|
||||
|
|
|
@ -32,7 +32,7 @@ STATUS CaffeTanhParser::Parse(const caffe::LayerParameter &proto,
|
|||
return RET_OK;
|
||||
}
|
||||
|
||||
CaffeNodeRegistrar g_caffeTanhParser("Tanh", new CaffeTanhParser());
|
||||
CaffeNodeRegistrar g_caffeTanhParser("TanH", new CaffeTanhParser());
|
||||
} // namespace lite
|
||||
} // namespace mindspore
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ STATUS OnnxSliceParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::No
|
|||
const auto &attribute_name = onnx_node_attr.name();
|
||||
if (attribute_name == "starts") {
|
||||
const int size = onnx_node_attr.ints_size();
|
||||
MS_LOG(ERROR) << "SLICE starts size " << size;
|
||||
MS_LOG(INFO) << "SLICE starts size " << size;
|
||||
for (int i = 0; i < size; ++i) {
|
||||
attr->begin.emplace_back(static_cast<int32_t>(onnx_node_attr.ints(i)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue