Considering CUDA and cuDNN installed. To access and get information about GPU, run the following command:
GPU, multi-GPU, and parallel options require Parallel Computing Toolbox. To use a GPU for deep learning, you must also have a CUDA® enabled NVIDIA® GPU with compute capability 3.0 or higher.
To use GPU for deep learning, set 'ExecutionEnvironment' in ‘trainingOptions’ as 'gpu'. By default, ‘trainingOptions’ take GPU by default.
Hope this helps.