yolov3 训练时出现的问题
报错Numpy版本不对 重新按照numpy无法解决
UserWarning: Failed to initialize NumPy: module compiled against API version 0x10 but this version of numpy is 0xf (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:77.)
该回答引用GPTᴼᴾᴱᴺᴬᴵ
这个错误提示表明你的 PyTorch 模块是使用 API 版本 0x10 编译的,但是当前安装的 NumPy 版本的 API 版本是 0xf。这通常是由于 NumPy 版本与 PyTorch 版本不兼容导致的。你可以尝试更新 NumPy 版本,或者安装与 PyTorch 兼容的 NumPy 版本。具体的解决方法如下:
1.更新 NumPy 版本:使用 pip 命令更新 NumPy 版本,可以使用如下命令:
pip install numpy --upgrade
2.安装与 PyTorch 兼容的 NumPy 版本:在安装 PyTorch 时,可以指定使用的 NumPy 版本,例如:
pip install torch torchvision -f https://download.pytorch.org/whl/cu111/torch_stable.html numpy==1.19.3
其中,指定了安装 PyTorch、Torchvision 以及兼容的 NumPy 版本 1.19.3。你可以根据自己的需求指定不同的 PyTorch 版本和 NumPy 版本。
建议直接安装 anaconda 这种打包好的
不知道你这个问题是否已经解决, 如果还没有解决的话: