目录
1.AttributeError: module 'numpy' has no attribute 'int'
2.RuntimeError: result type Float can't be cast to the desired output type long int
1.AttributeError: module 'numpy' has no attribute 'int'
解决方法:AttributeError: module numpy has no attribute int .报错解决方案_小恶魔饿了的博客-CSDN博客
2.RuntimeError: result type Float can't be cast to the desired output type long int
解决方法:
3.运行很慢很慢,gpu占用率低低低
解决方法:
YOLOv5训练速度慢 GPU占用率低_Goyavae的博客-CSDN博客
会快一点,gpu使用率明显高了一点(呜呜,也没有高很多)
我还是觉得不够快,于是:
使用GPU训练深度模型时,GPU显存占用低,利用率显示为0,而CPU占用很高。请问这怎么解决呢? - 知乎 (zhihu.com)
我把batch-size调整了,调整到100和我的epochs一样,结果出错:
4.OutOfMemoryError: CUDA out of memory. Tried to allocate 50.00 MiB (GPU 0; 23.65 GiB total capacity; 21.91 GiB already allocated; 4.56 MiB free; 22.06 GiB 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
解决办法:
训练yolov5时,RuntimeError: CUDA out of memory._yolo memoryerror_口在天上,数在心中的博客-CSDN博客
于是我又把batch-size改小到50,不行;改到30还是不行;我改到10终于就可以了,也要更快一些,占用gpu也要更多一些
参考:
深度学习训练中的GPU利用率和显存占用问题、num_workers&batch_size设置问题 - 知乎 (zhihu.com)