alibaba / MNN

MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba
http://www.mnn.zone/
8.72k stars 1.67k forks source link

Resize error when executing mobilenet_v2_224_1.0 #205

Closed nullptr-leo closed 5 years ago

nullptr-leo commented 5 years ago

STEPS:

  1. Download the official mobilenetv2_224_1.0 frozen pb file here (model repo page)
  2. Use MNNConvert tool to convert it to MNN model:
    ./MNNConvert --framework TF --modelFile /path/to/mobilenet_v2_1.0_224_frozen.pb --MNNModel /path/to/mbv2.mnn --bizCode MNN

    Results:

    
    MNNConverter Version: 0.0.0.1 - MNN @ 2018

Start to Convert Other Model Format To MNN Model... Start to Optimize the MNN Net... [17:25:31] /path/to/MNN/tools/converter/source/optimizer/optimizer.cpp:44: Inputs: input [17:25:31] /path/to/MNN/tools/converter/source/optimizer/optimizer.cpp:54: Outputs: MobilenetV2/Predictions/Reshape_1, Type = Reshape Converted Done!

3. Run `benchmark.out` (loop=1, CPU, thread=1):

./benchmark.out ../benchmark/mbnet/ 1 0 1

Error occured:

MNN benchmark Forward type: CPU thread=1** precision=2 --------> Benchmarking... loop = 1 Resize error for MobilenetV2/Conv/Conv2D, code=3 Error for /path/to/MNN/source/core/MNNMemoryUtils.c, 19 [ - ] mbv2.mnn max = 0.000ms min = 0.000ms avg = 0.000ms

`MNNMemoryUtils.c` [Line#19](https://github.com/alibaba/MNN/blob/master/source/core/MNNMemoryUtils.c#19):

18: void *MNNMemoryAllocAlign(size_t size, size_t alignment) { 19: MNN_ASSERT(size > 0);

czy2014hust commented 5 years ago

check out here