nncase usage



  • I am looking at the example for nncase...

    ncc -i tflite -o k210code --dataset ./images ./mbnetv1.tflite ./mbnetv1.c

    What is the purpose of --dataset?

    Also, I tried "-i caffe" using Preview 0.1.0 Preview5 and I get the following error.

    Fatal: Specified method is not supported.



    1. concatenate is not supported yet.
    2. stride = 2 is supported with padding=SAME but the TensorFlow padding method is different from K210. So you must use space_to_batchnd to pad manually and use padding=Valid.
    3. Not yet, however you can debug nncase, it's open source.


  • I have more questions :

    I see that TF seems to be better supported so I went back to try out a model using TFLite file.

    I get the following error:

    Fatal: Specified method is not supported.

    I understand it means I have some unsupported layers.

    For example, to limit model size, we use try to use squeezenet, so does K210 support concatenate?

    So, how can I debug, is there a list of supported operations/layers?

    Questions :

    1. Is concatenate supported? Example, fire module in squeezenet
    2. When stride=2 for Conv, does not support padding=SAME when stride=2. How about pooling when stride=2?
    3. Is there a way to have better error messages?


  • @sunnycase thanks for your response.

    1. For -dataset, I noticed we provide a directory path, so must have all the images in the path? Is there any naming convention?
    1. For caffe mode, what are the command line options? For example, I would imagine I need to provide .prototxt and .caffemodel files.

    I tried the following models (tinySSD)
    https://github.com/lampsonSong/tinySSD.git

    I then execute ncc.exe using the following command. I get the error :
    Fatal: Wire Type is invalid.

    ..\ncc\ncc.exe -i caffe -o k210code .\model\tiny_ssd_voc_test.prototxt .\model_iter_180000.caffemodel

    Where should I look to have a better understanding of the error messages? Also, is there an example of caffe model conversion that is working so I can use it as a reference?

    Thanks in advance.



    1. dataset is used to calculate quantization parameters.
    2. Fatal: Specified method is not supported. means your model has layers that are not supported. You should check your model and ensure your model is saved with inference phase that doesn't have layers like DataMulti or SoftmaxWithLoss etc...