def create_multi_gpu_storage(size=1024):
multi_storage = []
device_cnt = torch.cuda.device_count()
for device_no in range(device_cnt):
with torch.cuda.device(device_no):
multi_storage.append(torch.Storage(size).cuda())
return multi_storage
densenet_efficient_multi_gpu.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录