Structure of the model for tf.load()

I have a custom .tflite net that has:

  1. Input structure [1,3,32,32]
  2. Output structure [1,4]
  3. The size of the net is 5,25 MB
  4. I used the the load_to_fb = true

When I try to run a very simple code:

import os, tf
nn = tf.load(net, load_to_fb = True)
ll = nn.len()
print(ll)

the OpenMv H7 Plus crashes. A reset occurs. The green led blinks few times and then the white led blinks.

When I use a net with the structure:

  1. Input structure [1,224,224,3]
  2. Output structure [1,4]
  3. The size of the net is 8,53 MB
  4. I used the the load_to_fb = true
    Everything works without any problem.

The OpenMv H7 Plus reset could be caused by the net structure?
Do you have any advice? Should I change the net structure?

Thank you. Regards.

Hi, it would be because of a crash in the TensorFlow library. It’s not related to our code. For example, we suck the model into RAM, then we try to open it with TensorFlow. The TensorFlow library will directly read structures in the data binary and if there’s anything it can’t handle it will generally throw an error. But, there’s quite a bit of bugs in the library.

That said, we haven’t updated in over 6 months. So, we’re due to an update. I will be doing this soon to support Object Detection networks. I don’t have a fix for this right now other than to wait until I can update our TensorFlow package.

Hi,
I understand that the tf micro library, that is included in openMV, is an old release (March 2020?). This means that transpose operation is not supported, right?
In my net there are few transpose operations. Could be the reason for board crashes?

Thank you.
Regards.
Andrea.

It could be. I will be updating the library soon. However, I am dealing with getting the MT9M114 driver working so we can make H7 boards again.