赞
踩
完整报错提示OutOfMemoryError: CUDA out of memory. Tried to allocate 128.00 MiB. GPU 0 has a total capacity of 6.00 GiB of which 0 bytes is free. Of the allocated memory 5.25 GiB is allocated by PyTorch, and 834.00 KiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
笔者的显存大小为6g,但没有占用gpu,猜测是显存过小导致的问题
笔者直接在命令行运行相关python文件,因此找到目标文件
在右下角添加quantize(4),就保证代码的正常运行
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。