Official TensorFlow for Jetson Nano!

Hi All,

At last, I compiled the tensorflor-1.15 for python 3.7. Let me know, if anyone is interested.

Regards
Ashok

Hi,

Some links to the dependency seem broken.
I am getting the following errors.

Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page
    resp.raise_for_status()
  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://developer.download.nvidia.com/compute/redist/jp/v43/opt-einsum/

I just tried the described procedure and have exactly the same issue as feicccccccc. Any update on that?

Hmm this is weird. I just discovered weird behavior on directory listing at https://developer.download.nvidia.com/compute/redist/jp/v43. That link only list for tensorflow-gpu directory. But if I try to enter directory tensorflow instead of tensorflow-gpu, the directory exists. I wonder why it’s hidden on directory listing tho?

installed tf_trt_models on Jetson-nano. Jetpack 4.2, TF 1.13. I am getting the following error:

Installed /home/aaa-dev/.local/lib/python3.6/site-packages/slim-0.1-py3.6.egg
Processing dependencies for slim==0.1
Finished processing dependencies for slim==0.1
~/tf_trt_models
Installing tf_trt_models
/home/aaa-dev/tf_trt_models
running install
Checking .pth file support in /home/aaa-dev/.local/lib/python3.6/site-packages/
/home/aaa-dev/.virtualenvs/nanocv/bin/python -E -c pass
TEST FAILED: /home/aaa-dev/.local/lib/python3.6/site-packages/ does NOT support .pth files
bad install directory or PYTHONPATH

@T-DevH

Ok I found the issue here. Very very tiny problem. I am using virtualenv and I should remove --user from the install.sh script.

Hello

What are the plans to release the official TensorFlow release for Jetpack 4.4?

I just got my new Jetson Nano, followed the installation and now seems I have Jetpack 4.4 which seems it is not the “production ready” version. So if I want TensorFlow seems I have two options: either wait for you to release the new version or downgrade to Jetpack 4.3, right?

The problem is that I have installed CUDA 10.2 but TensorFlow requires CUDA 10.0.

Thank you.

Jetpack 4.3 does have CUDA Version 10.0.166, Is that a problem?

This is the downgrade option, as I am already on Jetpack 4.4 because this is what gets installed in the starting guide.
I would prefer an interim build of tensorflow with jetpack 4.4 libraries

ERROR: tensorflow-gpu 1.14.0+nv19.10 has requirement tensorboard<1.15.0,>=1.14.0, but you’ll have tensorboard 2.1.1 which is incompatible.
ERROR: tensorflow-gpu 1.14.0+nv19.10 has requirement tensorflow-estimator<1.15.0rc0,>=1.14.0rc0, but you’ll have tensorflow-estimator 2.1.0 which is incompatible.

Please release the Tensorflow 1.x for jetpack 4.4. when will release?

Hi @LoveNvidia, TF 1.x will be posted shortly (this week), please stay tuned.

The TensorFlow wheels for JetPack 4.4 Developer Preview have now been posted, you can find them here:

1 Like

Hey! Just installed tensorflow 2.1 for Jetpack 4.4, but
 something happens
 seems it runs slower


So with Jetpack 4.4, and tensorflow 2.1.0+nv20.3.tf2, with a simple MNIST Neural Net (1 FC(128) + Relu + FC(10) + Softmax ) it takes 13 secs / epoch (220 us/step)
In this configuration an instruction such as tf.config.list_physical_devices('GPU')does not detect the GPU. Also in the jupyter lab console there are several messages of libraries not been able to load CUDA libraries (as expected)

So now with the new tensorflow 2.1.0+nv20.4, with the same notebook, no errors loading CUDA libraties, and being able to detect the GPU, I am getting much worse results: 19 secs / epoch (330 us/step)

How is that possible? Is it possible that the four CPUs train faster than the GPU?

My laptop (with intel i5-7300 @ 2.6GHz) takes 7 s / epoch (110 us / step), I expected to get better figures with the jetson.

My laptop (with intel i5-7300 @ 2.6GHz) takes 7 s / epoch (110 us / step), I expected to get better figures with the jetson.

Why would you expect a $99 single board computer would outperform a $1000+ laptop? The laptop CPU alone is around $600 on amazon.

Regardless, I think the Jetson Nano is geared more for inference than training – a low cost device that performs well enough to be useful in many applications.

Hiya,

I am having trouble with the command you have included for JetPack4.4 TF 1.15 installation, this is what I get back, any suggestions please? Thanks!

-nano:~$ sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v44 ‘tensorflow<2’
bash: 2’: No such file or directory

EDIT: I just went and downloaded the whl myself from the link and installed it. so nevermind :P

Heya,

After installing as described in first post. On attempting to import tf (I have installed 1.15 from provided whl) this is what I get back, as well as a window asking if I wish to send error report.

nano:~$ python3
Python 3.6.9 (default, Apr 18 2020, 01:56:04) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
2020-05-07 18:51:56.337978: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.2'; dlerror: libcudart.so.10.2: cannot open shared object file: No such file or directory
2020-05-07 18:51:56.338065: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2020-05-07 18:51:56.338526: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.2'; dlerror: libcudart.so.10.2: cannot open shared object file: No such file or directory
2020-05-07 18:51:56.338574: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Segmentation fault (core dumped)

I have CUDA 10.0:

nano:/usr/local/cuda/bin$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Mon_Mar_11_22:13:24_CDT_2019
Cuda compilation tools, release 10.0, V10.0.326

TensorRT imports fine but not tensorflow. I’m kinda scared if I start trying to install a new CUDA version I will mess that up
 CUDA 10 is what came with the jetpack4.4 I got, no idea how to change it to 10.2

Any help appreciated.

EDIT: Same thing happens when trying to import uff

Thanks

If you only have CUDA 10.0, then you don’t have Jetpack 4.4.

And I was so sure of myself lol you’re right thank you I managed to find and install the correct version as it turns out I am on 4.3! :P cheers.

1 Like

I have been following the exact steps. However, when I try
python3
import tensorflow

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/__init__.py", line 99, in <module>
    from tensorflow_core import *
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/__init__.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/__init__.py", line 50, in __getattr__
    module = self._load()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/core/framework/graph_pb2.py", line 10, in <module>
    from google.protobuf import symbol_database as _symbol_database
ImportError: cannot import name 'symbol_database'

It seems that this is a protobuf problem.

Here is the output of the installation:

Requirement already satisfied: tensorflow<2 in /usr/local/lib/python3.6/dist-packages (1.15.2+nv20.4)
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (1.1.0)
Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (1.28.1)
Requirement already satisfied: keras-applications>=1.0.8 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (1.0.8)
Requirement already satisfied: tensorflow-estimator==1.15.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (1.15.1)
Requirement already satisfied: absl-py>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (0.9.0)
Requirement already satisfied: wrapt>=1.11.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (1.12.1)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (1.14.0)
Requirement already satisfied: google-pasta>=0.1.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (0.2.0)
Requirement already satisfied: gast==0.2.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (0.2.2)
Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (3.11.3)
Requirement already satisfied: wheel>=0.26; python_version >= "3" in /usr/lib/python3/dist-packages (from tensorflow<2) (0.30.0)
Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (3.2.1)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (1.0.5)
Requirement already satisfied: numpy<2.0,>=1.16.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (1.16.1)
Requirement already satisfied: tensorboard<1.16.0,>=1.15.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (1.15.0)
Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow<2) (0.8.1)
Requirement already satisfied: h5py in /usr/local/lib/python3.6/dist-packages (from keras-applications>=1.0.8->tensorflow<2) (2.9.0)
Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (from protobuf>=3.6.1->tensorflow<2) (46.1.3)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow<2) (3.2.2)
Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow<2) (1.0.1)
Requirement already satisfied: importlib-metadata; python_version < "3.8" in /usr/local/lib/python3.6/dist-packages (from markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow<2) (1.6.0)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/dist-packages (from importlib-metadata; python_version < "3.8"->markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow<2) (3.1.0)

Any help would be appreciated. This is a Jetson Nano with JP4.4

Regards,

Andreas