I did the same installation(tf 2.10, python 3.8, CUDA 11.8,cudnn 8.6) it could also detect the gpu, but when i was training it was not using gpu. Later on, by using nvidia-smi this command I gotta know my pc is not using gpu. 1 epoch went like 11 hrs.