How to install tensorflow version2.x

Hello, can someone please help me?
I am trying to install tensorflow on a Jetson Orin Nano with JetPack 5.10.

TensorFlow 2.x package version 2.12.0

sudo pip3 install --extra-index-url Index of /compute/redist/jp/v511 tensorflow==2.12.0+nv23.05
On installation
File “/tmp/pip-install-k8tb_u0r/grpcio/src/python/grpcio/support.py”, line 111, in <module
CompileError: diagnose_compile_error,.
AttributeError: module ‘setuptools.errors’ has no attribute ‘CompileError’
Error.
Installing with pip install --upgrade setuptools does not work.
If anyone can help me install these libraries, I would appreciate it.

Hi,

Have you run the " Prerequisites and Dependencies" before installing the TensorFlow package?
If not, please give it a try.

Thanks.

Thank you, I was able to install sensorflow==2.12.0+nv23.06.
However, when I ran the following train_1.py, I got an alert that it is not running on CUDA.
Any suggestions for running it on OrinNano GPU/CUDA would be appreciated. Thank you in advance.

train_1.py

import sys
import argparse
import glob
import pickle
import numpy
from music21 import converter, instrument, note, chord
from keras.models import sequential
from keras.layers import Dense
from keras.layers import Dropout
from keras.layers import LSTM
from keras.layers import Activation
from keras.layers import BatchNormalization as BatchNorm
from keras.layers import Bidirectional
from keras.utils import np_utils
from keras.callbacks import Model Checkpoints

.....

model = Sequential()
model.add(Bidirectional(LSTM(
    128,
    input_shape=(network_input.shape[1], network_input.shape[2]),
    recurrent_dropout=0.3,
    return_sequences=True
)))
model.add(LSTM(128, return_sequences=True, recurrent_dropout=0.3,))
model.add(LSTM(128))
model.add(BatchNorm())
model.add(Dropout(0.3))
model.add(Dense(128))
model.add(Activation('relu'))
model.add(BatchNorm())
model.add(Dropout(0.3))
model.add(Dense(n_vocab))
model.add(Activation('softmax'))
model.compile(loss='categorical_crossentropy', optimizer='rmsprop')    
.....

python train_1.py
WARNING:tensorflow:Layer lstm does not use the cuDNN kernel; when running on a GPU, it uses the generic GPU kernel as fallback.
WARNING:tensorflow:Layer lstm does not use the cuDNN kernel; when running on a GPU, it uses the generic GPU kernel as fallback.
WARNING:tensorflow:Layer lstm does not use the cuDNN kernel; when running on a GPU, it uses the generic GPU kernel as fallback.
WARNING:tensorflow:Layer lstm_1 does not use the cuDNN kernel; when running on a GPU, it uses the generic GPU kernel as fallback.

Hi,

The error message indicates it doesn’t use cuDNN but GPU kernel.
So it still uses GPU to train the model.

The message should relate to the implementation/support of TensorFlow.
Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.