持续更新中......
TypeError: np.matrix is not supported. Please convert to a numpy array with np.asarray
解决方案:https://github.com/XingyanLiu/CAME/issues/20
numpy 1.23.2
scikit-learn 1.1.2
scipy 1.9.1
使用CUDA进行模型训练时出现错误RuntimeError: No CUDA GPUs are available
解决方案:1.先检测是否有GPU
print(torch.cuda.is_available())
返回0则是pytorch CUDA安装的问题
2.如果返回1,注意代码中是否有“os.environ”,“CUDA_VISIBLE_DEVICE”,是否是代码设置了显卡编号,默认编号是0
AttributeError: module 'numpy' has no attribute 'float'
解决方案:从numpy1.24起,删除了numpy.bool、numpy.int、numpy.fioat、numpy.complex, numpy.object, numpy.str、numpy.long、numpy.unicode类型的支持
pip uninstall numpy
pip install numpy==1.23.5