@nabil.affo A basic way to do is have Nvidia SMI installed if you are working with Linux.
nvidia-smi -q -g 0 -d UTILIZATION -l
this command would help you to get your GPU utilization in terminal.
Another way to check it would be to import torch
and then execute torch.cuda.device(0)
this will show your GPU device id. You can also view device name by typing torch.cuda.get_device_name(0)
.
You can have a look here: Is my GPU being used & How to check your pytorch / keras is using the GPU?