Transforms.Resize()

After adding the transforms.Resize(), Why the training of model gets slowly?

Resize is executed on the CPU. If you see a significant slowdown, your CPU might suffer from this additional workload although I would assume the operation isn’t particularly expensive (but might be wrong).