Ubuntu 22.04
Sponsored Link

TensorFlow : स्थापित करें2023/09/21

 
TensorFlow स्थापित करें जो मशीन लर्निंग लाइब्रेरी है।
[1]
[2]
[3] cuDNN (CUDA Deep Neural Network library) और अन्य आवश्यक पैकेज स्थापित करें।
root@dlp:~#
apt -y install nvidia-cudnn python3-pip python3-dev python3-venv gcc g++ make

[4] एक सामान्य उपयोगकर्ता के रूप में लॉगिन करें और TensorFlow स्थापित करने के लिए Python वर्चुअल वातावरण तैयार करें।
ubuntu@dlp:~$
python3 -m venv --system-site-packages ~/tensorflow

ubuntu@dlp:~$
source ~/tensorflow/bin/activate

(tensorflow) ubuntu@dlp:~$
[5] TensorFlow 2.9 स्थापित करें।
(tensorflow) ubuntu@dlp:~$
pip3 install --upgrade tensorflow==2.9.0
# TensorFlow चलाने के लिए सत्यापित करें

(tensorflow) ubuntu@dlp:~$
python3 -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

2022-09-08 04:40:48.411169: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-09-08 04:40:48.481549: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-09-08 04:40:48.482004: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-09-08 04:40:48.482920: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-09-08 04:40:48.483404: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-09-08 04:40:48.483781: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-09-08 04:40:48.484111: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-09-08 04:40:49.082588: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-09-08 04:40:49.082927: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-09-08 04:40:49.083118: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:975] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-09-08 04:40:49.083407: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 5391 MB memory:  -> device: 0, name: NVIDIA GeForce GTX 1060 6GB, pci bus id: 0000:05:00.0, compute capability: 6.1
tf.Tensor(637.8404, shape=(), dtype=float32)
मिलान सामग्री