# Memory allocation failedd

**URL:** <https://forums.openmv.io/t/memory-allocation-failedd/8379>\
**Category:** OpenMV Boards\
**Created:** [May 29, 2023, 4:04am UTC](https://forums.openmv.io/t/memory-allocation-failedd/8379 "2023-05-29T04:04:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wael](https://avatars.discourse-cdn.com/v4/letter/w/b9e5f3/32.png) [@wael](https://forums.openmv.io/u/wael)\
**Post date:** [May 29, 2023, 4:04am UTC](https://forums.openmv.io/t/memory-allocation-failedd/8379/1 "2023-05-29T04:04:59Z")

</div>

Hi, I’m trying to load my model, and it’s about 300 kb, and I’m using the Cam OpenMV H7 Plus and a memory card, but I’m getting this error(memory allocation failed ). I’m trying to solve this issue, but I did not find any solution.

---

<div class="post-metadata">

**Author:** ![BehicMV](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/behicmv/32/2233_2.png) [@BehicMV](https://forums.openmv.io/u/BehicMV)\
**Post date:** [May 29, 2023, 2:19pm UTC](https://forums.openmv.io/t/memory-allocation-failedd/8379/2 "2023-05-29T14:19:43Z")

</div>

Hi, @wael

If you use `net = tf.load("trained.tflite")` , you can use `net = tf.load("trained.tflite",load_to_fb=True)`. This will be allow you more space to use. If you have any question, I’m here to help!

---

<div class="post-metadata">

**Author:** ![wael](https://avatars.discourse-cdn.com/v4/letter/w/b9e5f3/32.png) [@wael](https://forums.openmv.io/u/wael)\
**Post date:** [May 30, 2023, 8:36am UTC](https://forums.openmv.io/t/memory-allocation-failedd/8379/3 "2023-05-30T08:36:40Z")

</div>

> [@BehicMV](#):
>
> `net = tf.load("trained.tflite",load_to_fb=True)`

thank you for your reply i tried with this solution but each time i run the code the code stop and open the file location of the cam

---

<div class="post-metadata">

**Author:** ![BehicMV](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/behicmv/32/2233_2.png) [@BehicMV](https://forums.openmv.io/u/BehicMV)\
**Post date:** [May 30, 2023, 8:49am UTC](https://forums.openmv.io/t/memory-allocation-failedd/8379/4 "2023-05-30T08:49:23Z")

</div>

Okay I see, this situation might be caused by your tflite model’s incompatible layers. Can you share your tflite model?

---

<div class="post-metadata">

**Author:** ![wael](https://avatars.discourse-cdn.com/v4/letter/w/b9e5f3/32.png) [@wael](https://forums.openmv.io/u/wael)\
**Post date:** [May 30, 2023, 9:08am UTC](https://forums.openmv.io/t/memory-allocation-failedd/8379/5 "2023-05-30T09:08:10Z")

</div>

i will share the link of the drive because im not able to share a tflite file here i dont know why

> **[Google Drive: Sign-in](https://accounts.google.com/v3/signin/identifier?dsh=S939691726%3A1685437667497751&continue=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1r9XiQC1Yr7TYA9usPWAxsLLnPw-qiWMx%2Fview%3Fusp%3Dsharing&followup=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1r9XiQC1Yr7TYA9usPWAxsLLnPw-qiWMx%2Fview%3Fusp%3Dsharing&ifkv=Af_xneHzc0lf9Ns4F83vzSF5fiZpCNr2Y5yUXxm9_rGk5bnj1N2fQRA-2m5wjnBnDMq71ckY43UBFg&osid=1&passive=1209600&service=wise&flowName=WebLiteSignIn&flowEntry=ServiceLogin)**
>
> Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).

thank you

---

<div class="post-metadata">

**Author:** ![wael](https://avatars.discourse-cdn.com/v4/letter/w/b9e5f3/32.png) [@wael](https://forums.openmv.io/u/wael)\
**Post date:** [June 2, 2023, 9:05am UTC](https://forums.openmv.io/t/memory-allocation-failedd/8379/6 "2023-06-02T09:05:21Z")

</div>

hi BechicMV please can i ask you if you tried with the model thank you

---

<div class="post-metadata">

**Author:** ![BehicMV](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/behicmv/32/2233_2.png) [@BehicMV](https://forums.openmv.io/u/BehicMV)\
**Post date:** [June 12, 2023, 6:44pm UTC](https://forums.openmv.io/t/memory-allocation-failedd/8379/7 "2023-06-12T18:44:54Z")

</div>

Sorry for the late answer; I was busy.  
The link does not work. You have to edit the permission with “anyone with the link”
