Error while using a new model

Vishal Vats
Vishal Vats Posts: 5
edited January 2023 in SnapML #1

I was trying to use the .tflte models in my lens, but when I am dropping the same in the resources panel, the following error is coming:


The documentation states that a .pb file works fine but in my case, it is throwing this error. Why is that? Also, I want clarity do I have to use a pb(frozen graph file) or a .tflite file. And more importantly, why this error is coming and how to solve this?

The yensorflow proto error is coming when I am dropping a .pb come into the resources panel and Tensor rank at StatefulPartitionedCall:1 must be smaller or equal to 4 error is coming when I am using a .tflite model file. Why is that?

Any help would be great 👍


  • Hi @Vishal Vats , currently we are trying to deprecate .pb format and moving towards .tflite. Would you mind sharing the TFLite model you were trying to import?

  • Vishal Vats
    Vishal Vats Posts: 5
    edited February 2023 #3

    Thanks @Eric Hu for your reply. Actually, I was busy making my submission for the Lensathon event and that's why I didn't notice your reply. The model that I was using is

    The zipped folder contains a pb file and I followed the steps to convert a pb model into a tflite model. BUt neither the pb model nor the tflite model worked.

    But I changed the lens and finally submitted it. But if you can tell me how to use a custom pre-trained model, like I was trying, then it would be great. Waiting for your reply

    I even tried using the COCO SSD model's .onxx file and it was also throwing errors.