以下是一些PyTorch在Ubuntu上的優化技巧:
torch.cuda.amp
num_workers
pin_memory
@lru_cache
torch.nn.DataParallel
torch.nn.parallel.DistributedDataParallel