import SummaryWriter 会提示 CUDA error: out of memory
本来想用一下tensorboard,但是import的时候就报错:
from torch.utils.tensorboard import SummaryWriter
仅仅是import报错,后面没有进行任何操作:
RuntimeError: CUDA error: out of memory (malloc at /pytorch/c10/cuda/CUDACachingAllocator.cpp:241)
<omitting python frames>
frame #20: THPFunction_apply(_object*, _object*) + 0x6b1 (0x7ff3f4713301 in /home/guanyonglai/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so)