About PyTorch's GPU Acceleration

When using the PyTorch, if you want to use the GPU only need to add ‘.cuda()’ in the corresponding place, or do you need other instructions in addition to this operation?
Why, when I only use ‘.cuda()’, I can be sure that he is running on the GPU, but I can’t feel the speed increase.

You should make sure to call .cuda() or .to(device='cuda') on your data and your model.
Depending on the model architecture, pushing it to the GPU won’t give you any speedups.
This is usually the case for small models.

Could you post your model architecture?

U can also check the bottleneck of your code. Sometimes, the data loading or other preprocessing will occupy some time.

Thank you for your answer