Tensorflow and keras on pynq z2

Hi,
I want to try the classification on pynq z2 by following: PYNQ-CNN-ATTEMPT/Ultrasound-Image-Classification-CNN at master · ZhaoqxCN/PYNQ-CNN-ATTEMPT · GitHub
It needs keras which internally needs tensorflow. I could install keras somehow but dont know what to do for tensorflow.

After searching on forum, I could see people tried installing it previously also btu could not find any working solution.
So, can anyone help with this now.

Hi there,

I don’t think tensorflow has official support for arm32 on the Z2, so you’d have to compile it from source. I’ve not tried it but might be worth looking into tensorflow-lite for this as well as that is supposed to play nicely with arm processors.

Thanks
Shawn

1 Like

Hi Sir, I am having model.tflite (Tensorflow flow lite model). I want to run it on PYNQ-Z2 Board which is of 32 bit . I am struck at Bazel commands in implemening it. When I use command:
bazel build --config=elinux_armhf -c opt model1.tflite
I am getting error as
ERROR: Config value ‘elinux_armhf’ is not defined in any .rc file
Could you please help in this?

Hi @Nitw123456,

I’m not very familiar with bazel so can’t advise too much. There seem to be similar issues to your error raised on the tensorflow issue tracker. Maybe you will find an answer searching those issues.

Thanks
Shawn

Hi Sir,

SHall I know how you implemented tflite inference model on PYNQ-Z2 32bit arm. Atpresent , I am having model.tflite which I generated from .h5 file. Shall you suggest me in this?

Did you find the solution to how to implement Tf or Tflite on Pynq z2 board?

I am facing a serious issue installing Tf, can someone please help me with this?