dusty-nv / jetson-containers

Machine Learning Containers for NVIDIA Jetson and JetPack-L4T
MIT License
2.31k stars 475 forks source link

TF 2.9 on Jetson Nano? #200

Closed javadan closed 2 years ago

javadan commented 2 years ago

Not an issue... But asking for advice.

I've got a Jetson Nano, with 4.6.2 jetpack.

I've encountered a bug in tensorflow2, which still isn't fixed in tf2.7. (the tf.data.Dataset.map function used in their tutorials is broken)

I know it's fixed in tf 2.9.2, because that's the version the Google colab is using, and that works.

My options are to upgrade TF2, or to rewrite their functional code in an imperative style, (for loops), so it bypasses the bug.

I am using a custom dockerfile based off l4t-tensorflow:r32.7.1-tf2.7-py3

It looks like this is the last L4T that will work on the Nano. The Jetpack 5's appear to be NX/AGX/Orin only.

If I want to install TF2.9.2 on the Nano, what's my best option?

Or is there some gotcha I'm going to run into, and I should just stick to tf2.7 and rewrite the code?

Thanks

dusty-nv commented 2 years ago

If I want to install TF2.9.2 on the Nano, what's my best option?

Hi @javadan, it appears that TF 2.7 would be the last NVIDIA-provided wheel for JetPack 4.x: https://developer.download.nvidia.com/compute/redist/jp/v461/tensorflow/

So IMO your options would be to (a) build TensorFlow yourself or (b) rework the code for TF 2.7.

I haven't built TF2 for Jetson before, but here is an article about doing that: https://qengineering.eu/install-tensorflow-2.4.0-on-jetson-nano.html

javadan commented 2 years ago

Thanks I think I found a workaround for 2.7