import torch
# returns the maximum GPU memory occupied by tensors in bytes for a given device.
"cuda memory = {:.3f} GBs".format(torch.cuda.max_memory_allocated() / 1024 ** 3)
简单查看cuda已用memory
最新推荐文章于 2023-11-29 19:44:09 发布
import torch
# returns the maximum GPU memory occupied by tensors in bytes for a given device.
"cuda memory = {:.3f} GBs".format(torch.cuda.max_memory_allocated() / 1024 ** 3)