关于workers,上一篇可能有误。
经查,表示进程之义。0表示只有主进程,大于0的表示多个进程,加快数据读取。
下面是官方解释,估计也没人看官方源码吧
num_workers (int, optional): how many subprocesses to use for data
loading. ``0`` means that the data will be loaded in the main process.
(default: ``0``)
上一篇cuda占满的原因还是另一个参数,这个设置为True
pin_memory (bool, optional): If ``True``, the data loader will copy Tensors
into CUDA pinned memory before returnin