I just got a Jetson Nano and created my SD-Card with Jetpack 4.6.1. After that I installed TensorFlow like this: Tensorflow-Install
Than I wanted to create an mnist Model but it seems like I cant import Keras? Any Idea ?
I just install Tensorflow and upgraded all apt-get packages.
>>> import tensorflow.keras
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/keras/api/_v2/keras/__init__.py", line 12, in <module>
from keras import __version__
File "/usr/local/lib/python3.6/dist-packages/keras/__init__.py", line 24, in <module>
from keras import models
File "/usr/local/lib/python3.6/dist-packages/keras/models/__init__.py", line 18, in <module>
from keras.engine.functional import Functional
File "/usr/local/lib/python3.6/dist-packages/keras/engine/functional.py", line 24, in <module>
from keras.dtensor import layout_map as layout_map_lib
File "/usr/local/lib/python3.6/dist-packages/keras/dtensor/__init__.py", line 22, in <module>
from tensorflow.compat.v2.experimental import dtensor as dtensor_api # pylint: disable=g-import-not-at-top
ImportError: cannot import name 'dtensor'
>>>
This is the full Error log. I started python3 as sudo
Could you share how do you install the TensorFlow package?
We confirm that importing Keras with the l4t-tensorflow:r32.7.1-tf2.7-py3 container is working.
$ sudo docker run -it --rm --runtime nvidia --network host nvcr.io/nvidia/l4t-tensorflow:r32.7.1-tf2.7-py3
root@nvidia-desktop:/# python3
Python 3.6.9 (default, Dec 8 2021, 21:08:43)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keras
>>> import tensorflow.keras
>>>