-
Check the CUDA and CUDnn version compatibality that you need https://www.tensorflow.org/install/source#gpu
-
the NVIDIA CUDA Toolkit https://developer.nvidia.com/cuda-toolkit-archive
-
NVIDIA cuDNN https://developer.nvidia.com/cudnn
-
Python (check compatible version from first link) conda create --name tf_2.4 python==3.8
-
Tensorflow (with GPU support) pip install tensorflow
-
Test using this link https://github.com/aladdinpersson/Machine-Learning-Collection/blob/master/ML/TensorFlow/Basics/tutorial4-convnet.py
- clone tensorflow model
git clone https://github.com/tensorflow/models.git
- Compile Protoc
cd models/research
# Compile protos.
protoc object_detection/protos/*.proto --python_out=.
# Install TensorFlow Object Detection API.
cp object_detection/packages/tf2/setup.py .
python -m pip install .
- Test
python object_detection/builders/model_builder_tf2_test.py
- clone this repo
git clone https://github.com/tensorflow/models.git
- To start training
python model_main_tf2.py --pipeline_config_path=training/ssd_efficientdet_d0_512x512_coco17_tpu-8.config --model_dir=training --alsologtostderr
- To view tensor board
tensorboard --logdir=training/train
python exporter_main_v2.py --trained_checkpoint_dir=training --pipeline_config_path=training/ssd_efficientdet_d0_512x512_coco17_tpu-8.config --output_directory inference_graph
- To check the gpu is available or not
import tensorflow as tf
tf.config.list_physical_devices('GPU')
conda create -n tf-gpu
conda activate tf-gpu
conda install python=3.8
conda install -c anaconda cudatoolkit=10.1
pip install tensorflow-gpu==2.2
conda install -c anaconda cudnn=7.6
python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"