# Pynq & Tensorflow

**URL:** <https://discuss.pynq.io/t/pynq-tensorflow/5154>\
**Category:** Community corner\
**Created:** [January 28, 2023, 6:37pm UTC](https://discuss.pynq.io/t/pynq-tensorflow/5154 "2023-01-28T18:37:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![julianop99](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/julianop99/32/4201_2.png) [@julianop99](https://discuss.pynq.io/u/julianop99)\
**Post date:** [January 28, 2023, 6:37pm UTC](https://discuss.pynq.io/t/pynq-tensorflow/5154/1 "2023-01-28T18:37:31Z")

</div>

Hi everyone, I have developed a desktop application and now want to deploy it on the Ultra96v2, in principle in the Cortex A53.  
I use Python 3.9.7 and tensorflow 2.8.0.

I need to install tensorflow at the Ultra96, does anyone has a fail-safe tutorial that I can base on?  
I have spent most of my day today trying to install it without success.  
Have looked into:  
`https://www.96boards.org/documentation/consumer/guides/tensorflow-installation.md.html#2-tensorflow-with-static-libraries`

`https://www.tensorflow.org/install/source#ConfigureInstallation`  
and

`https://gist.github.com/kmhofmann/e368a2ebba05f807fa1a90b3bf9a1e03`

Any other hint would be appreciated!

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [January 28, 2023, 7:18pm UTC](https://discuss.pynq.io/t/pynq-tensorflow/5154/2 "2023-01-28T19:18:23Z")

</div>

@julianop99

If my memory is stuck recall correctly.  
For ZYNQ dual core ARM A9 800MHz it is far far way good to handle such amount of weight and layers.  
Eventually I got to just off train and export the weight and just lite Tensorflow (laziness of converting the weight to what AXI or LE can handle) and passed to the neurons via the AXIS DMA.  
Meanwhile, I haven’t had time to investigate how good is DDR4 and ultrascale ZYNQ is better. Of cause I do have the board but it is not necessary to do such implementation on my side.

So to enable such installation:  
1st you need a cross compiler to export the tensorflow package to the right ARM platform.  
2nd you need the hardware itself able to handle such amount of neurons of data aka weight + bias. Remember this is nothing about speed but size itself as below 1GB what do you expect?  
3rd if both 1 and 2 is able to break through then a CPU inference is what you are going to experience (full precision or fixed precision) then 1.xx GHz CPU inference speed hopefully it is fun to wait.

What I had done in ZYNQ 7000 series:  
Tutorial of simple MNIST tutorial:

> [@MNIST + AXI Stream on PYNQ 2.7 (Attention to Details)](https://discuss.pynq.io/t/mnist-axi-stream-on-pynq-2-7-attention-to-details/4267):
>
> Hello PYNQ community: I wish you all doing great =] Previous support posts are having trouble on AXI stream HLS about CNN design and DMA: So I am going to share the details on 2020.2 HLS tool and PYNQ 2.7 design. The Github Repository Link for this tutorial: HLS AXI Stream People keep asking about tlast is missing, which this is common that after version (not sure when) the structure C no longer interpret as we expected: Old struct AXI\_DMA\_IO{ ap\_int\<16\> data; ap\_int\<1\>last; }; New #in…

Enjoy~ =]
