# DPU load model error

**URL:** <https://discuss.pynq.io/t/dpu-load-model-error/4169>\
**Category:** Support\
**Created:** [May 8, 2022, 2:59am UTC](https://discuss.pynq.io/t/dpu-load-model-error/4169 "2022-05-08T02:59:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahuldee](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@Rahuldee](https://discuss.pynq.io/u/Rahuldee)\
**Post date:** [May 8, 2022, 2:59am UTC](https://discuss.pynq.io/t/dpu-load-model-error/4169/1 "2022-05-08T02:59:45Z")

</div>

I am working with Ubuntu image 20.04 for Kria Starter board.

The sample Jupyter notebooks in the pynq-dpu folder work fine with dpu\_resnet50.xmodel. I tried changing the model by changing the argument in the overlay.load\_model() function to mobilenetv3.

This resulted in the following error, when executing. I did recompile the mobilenet model using the arch.json file for KV260 board.

* * *

overlay.load\_model(“dpu\_mobilenetv3.xmodel”)  
File “/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq\_dpu/dpu.py”, line 171, in load\_model  
assert len(subgraphs) == 1  
AssertionError

Thanks,  
Rahul

---

<div class="post-metadata">

**Author:** ![Rahuldee](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@Rahuldee](https://discuss.pynq.io/u/Rahuldee)\
**Post date:** [May 8, 2022, 3:06am UTC](https://discuss.pynq.io/t/dpu-load-model-error/4169/2 "2022-05-08T03:06:48Z")

</div>

I first tried using the downloaded .xmodel from the link mentioned in the model.yaml. When this did not work, I tried compiling it using the arch.json for KV260 and tf2 quantized (.h5) model.

---

<div class="post-metadata">

**Author:** ![skalade](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/skalade/32/686_2.png) [@skalade](https://discuss.pynq.io/u/skalade)\
**Post date:** [May 9, 2022, 10:17am UTC](https://discuss.pynq.io/t/dpu-load-model-error/4169/3 "2022-05-09T10:17:53Z")

</div>

Hi there,

I think the reason for this is because you are downloading from the master branch of Vitis AI (where VART version is 2.0), DPU-PYNQ is still currently on v1.4 and that causes some model incompatibilities.

You could download [mobilenetv2](https://github.com/Xilinx/Vitis-AI/blob/1.4/models/AI-Model-Zoo/model-list/cf_mobilenetv2_imagenet_224_224_0.59G_1.4/model.yaml) from the v1.4 branch instead and that should work without issue, no need for re-compilation.

Thanks  
Shawn

---

<div class="post-metadata">

**Author:** ![Rahuldee](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@Rahuldee](https://discuss.pynq.io/u/Rahuldee)\
**Post date:** [May 9, 2022, 5:39pm UTC](https://discuss.pynq.io/t/dpu-load-model-error/4169/4 "2022-05-09T17:39:59Z")

</div>

The incoherency in VART (2.0) and DPU-PYNQ (1.4) versions was causing this. It works now!

Thank you.

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [May 31, 2022, 12:08pm UTC](https://discuss.pynq.io/t/dpu-load-model-error/4169/5 "2022-05-31T12:08:03Z")

</div>


