My problem about load kmodel file

  • Firstly, I have used kflash tool to download the kfpkg file to my maix dock development board. The screen shot of my flash-list.json file and kflash setting are shown as follow:
    As you can see, the kmodel file has been burned into the address 0x600000 and the size of m.kmodel file is 208072 bytes

    Then I wrote the testing code to test whether kpu can load this model:(That is a part of my code)

    But when compiled it and run it in my board, the screen display that "model init error" as below:
    ![0_1581869135758_b788e0b2-aafe-4536-867c-2c8607b69e36-图片.png](Uploading 100%)

    It seem that something is wrong, so i have entered the kpu_load_model function and i found that there are some if function in parallel:

    So may be the version of my model is wrong, so i add a print function and printed it in my screen:
    ![0_1581869151038_25376080-9324-402c-a4cb-8f7491506f0b-图片.png](Uploading 100%)

    That's all my attempts, what's wrong with my process or code ? Thank you!

  • Model init error is due to newer Kmodel version being produced by nncase.

    kpu.c which is in released SDK 0.5.6 doesn't support it. you need latest SDK for running the new models.

    Use latest development version from Github

  • There are some photo cannot be uploaded after serveral times attempt.
    So in the first time, the screen display that the model init error
    And in the second time, the screen display that the version of model is 50331648
    I don't know why the version of my model is so large.
    Can you help me? Thank you so much..