# Kernel dead when using Vitis AI on PYNQ Platforms with custom CNN model

**URL:** <https://discuss.pynq.io/t/kernel-dead-when-using-vitis-ai-on-pynq-platforms-with-custom-cnn-model/4771>\
**Category:** Support\
**Created:** [October 13, 2022, 9:14am UTC](https://discuss.pynq.io/t/kernel-dead-when-using-vitis-ai-on-pynq-platforms-with-custom-cnn-model/4771 "2022-10-13T09:14:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muhammad\_Faizan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/muhammad_faizan/32/3855_2.png) [@Muhammad\_Faizan](https://discuss.pynq.io/u/Muhammad_Faizan)\
**Post date:** [October 13, 2022, 9:14am UTC](https://discuss.pynq.io/t/kernel-dead-when-using-vitis-ai-on-pynq-platforms-with-custom-cnn-model/4771/1 "2022-10-13T09:14:42Z")

</div>

I am using ZUC104 as my target device and running PYNQ (the latest version) on the PS of the FPGA. I followed a tutorial provided on the Xilinx Vitis-AI git repository.

Link to tutorial: [DPU-PYNQ/dpu\_mnist\_classifier.ipynb at master · Xilinx/DPU-PYNQ · GitHub](https://github.com/Xilinx/DPU-PYNQ/blob/master/pynq_dpu/notebooks/dpu_mnist_classifier.ipynb)

The model is developed using Tensorflow 2.x and saved in .h5 format. I used Vitis AI Quantizer and Compiler to generate a .xmodel file that is deployable on the FPGA.

The problem is that when I try to execute the file (provide in the link above) with my custom model and dataset, an error occurs that says:

Kernel Restarting  
The kernel appears to have died. ​It will restart automatically.

Thanks

---

<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:** [October 13, 2022, 3:04pm UTC](https://discuss.pynq.io/t/kernel-dead-when-using-vitis-ai-on-pynq-platforms-with-custom-cnn-model/4771/2 "2022-10-13T15:04:55Z")

</div>

Hi there,

Can you clarify which version of pynq you are running on your board? The dpu-pynq package shouldn’t work on v3.0 because VART 1.4 is dependent specifically on python3.8 (we use 3.10 in pynq v3.0). For now I recommend using a v2.7.

We’re working on a new DPU-PYNQ update for the v3.0 image, will hopefully be able to release in a couple weeks.

Thanks  
Shawn

---

<div class="post-metadata">

**Author:** ![Muhammad\_Faizan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/muhammad_faizan/32/3855_2.png) [@Muhammad\_Faizan](https://discuss.pynq.io/u/Muhammad_Faizan)\
**Post date:** [October 13, 2022, 3:22pm UTC](https://discuss.pynq.io/t/kernel-dead-when-using-vitis-ai-on-pynq-platforms-with-custom-cnn-model/4771/3 "2022-10-13T15:22:15Z")

</div>

Thanks for your reply.

PYNQ version 2.7.0  
Git Id: 285d1457e64c076bbb39844afd54b38f075ad2c7

---

<div class="post-metadata">

**Author:** ![Muhammad\_Faizan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/muhammad_faizan/32/3855_2.png) [@Muhammad\_Faizan](https://discuss.pynq.io/u/Muhammad_Faizan)\
**Post date:** [October 13, 2022, 4:00pm UTC](https://discuss.pynq.io/t/kernel-dead-when-using-vitis-ai-on-pynq-platforms-with-custom-cnn-model/4771/4 "2022-10-13T16:00:33Z")

</div>

Can you help me out?

---

<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:** [October 13, 2022, 6:28pm UTC](https://discuss.pynq.io/t/kernel-dead-when-using-vitis-ai-on-pynq-platforms-with-custom-cnn-model/4771/5 "2022-10-13T18:28:59Z")

</div>

Ok so you’re trying to deploy a custom network. Is it another MNIST model? Need a lot more information on what you’re doing. Ideally code you ran to reproduce the issue.

What version of the docker image were you using to compile it? If you want to deploy a .xmodel on dpu-pynq (v2.7 image) you need the model to be compiled by the Vitis AI 1.4 compiler in the 1.4 version of the docker image.

You can get more info from the logs, after the kernel restarts check `/var/log/jupyter.log`, that might give a hint of what’s going on…

Thanks  
Shawn

---

<div class="post-metadata">

**Author:** ![Muhammad\_Faizan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/muhammad_faizan/32/3855_2.png) [@Muhammad\_Faizan](https://discuss.pynq.io/u/Muhammad_Faizan)\
**Post date:** [March 9, 2023, 4:26pm UTC](https://discuss.pynq.io/t/kernel-dead-when-using-vitis-ai-on-pynq-platforms-with-custom-cnn-model/4771/6 "2023-03-09T16:26:15Z")

</div>

Sorry for this late reply.

By compiling the model using Vitis AI 1.4, the problem was solved!!

Thanks a lot

---

<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:** [March 9, 2023, 5:24pm UTC](https://discuss.pynq.io/t/kernel-dead-when-using-vitis-ai-on-pynq-platforms-with-custom-cnn-model/4771/7 "2023-03-09T17:24:28Z")

</div>

Closed on March 9, 2023, 5:24pm UTC


