# Cannot load custom tflite models on OpenMV IDE

**URL:** <https://forums.openmv.io/t/cannot-load-custom-tflite-models-on-openmv-ide/7535>\
**Category:** OpenMV Boards\
**Created:** [September 28, 2022, 6:45am UTC](https://forums.openmv.io/t/cannot-load-custom-tflite-models-on-openmv-ide/7535 "2022-09-28T06:45:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![colinzwang](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@colinzwang](https://forums.openmv.io/u/colinzwang)\
**Post date:** [September 28, 2022, 6:45am UTC](https://forums.openmv.io/t/cannot-load-custom-tflite-models-on-openmv-ide/7535/1 "2022-09-28T06:45:14Z")

</div>

I trained a custom tflite model and tried to load it using the following script:

```auto
try:
    net = tf.load("android.tflite", load_to_fb=uos.stat('android.tflite')[6] > (gc.mem_free() - (64*1024)))
except Exception as e:
    raise Exception('Failed to load "trained.tflite", did you copy the .tflite and labels.txt file onto the mass-storage device? (' + str(e) + ')')

```

This raise exception every time. However, when I replace the android.tflite file to the built in trained.tflite there is no error. I’m wondering why this is happening.

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [September 30, 2022, 6:23pm UTC](https://forums.openmv.io/t/cannot-load-custom-tflite-models-on-openmv-ide/7535/2 "2022-09-30T18:23:42Z")

</div>

What’s the exception?

---

<div class="post-metadata">

**Author:** ![colinzwang](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@colinzwang](https://forums.openmv.io/u/colinzwang)\
**Post date:** [October 5, 2022, 2:41am UTC](https://forums.openmv.io/t/cannot-load-custom-tflite-models-on-openmv-ide/7535/3 "2022-10-05T02:41:10Z")

</div>

It’s the ‘Failed to load “trained.tflite”, did you copy the .tflite and labels.txt file onto the mass-storage device?’ Exception

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [October 10, 2022, 1:34pm UTC](https://forums.openmv.io/t/cannot-load-custom-tflite-models-on-openmv-ide/7535/4 "2022-10-10T13:34:35Z")

</div>

And did you deal with that issue?
