赞
踩
就是当网络参数什么都没有问题了,而且batch_size已经是最小了,还是出现以了问题
但据我遇到的RuntimeError: CUDA error: out of memoryCUDA,其实有两种,
RuntimeError: CUDA out of memory. Tried to allocate 338.00 MiB (GPU 0; 2.00 GiB total capacity; 842.86 MiB already allocated; 215.67 MiB free; 848.00 MiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
这种就是属于我选择冻结训练所导致的,就还是我电脑显卡内存不够,我就把冻结训练取消掉了,就遇到了
RuntimeError: CUDA error: out of memory
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
第二种就是显存不够了,那我搜索了了一圈,觉得最实在的就是
等你有了服务器,或者一个好的显卡,就会减少很多的烦恼
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。