Bug记录
记录复现模型代码过程中遇到的bug
JOYCE_Leo16
计算机视觉,深度学习,图像处理
展开
-
AttributeError: module ‘PIL.Image‘ has no attribute ‘ANTIALIAS‘
修改图片大小的时候,代码报错:AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'在pillow的10.0.0版本中,ANTIALIAS方法被删除了。原创 2024-05-12 17:25:28 · 140 阅读 · 0 评论 -
ImportError: cannot import name ‘compare_mse‘ from ‘skimage.measure‘
在复现模型代码的时候遇到错误:ImportError: cannot import name 'compare_mse' from 'skimage.measure' 。这是由于 scikit-image 的版本问题,由于scikit-image版本升级后就修改了库函数。原创 2024-05-10 10:03:11 · 262 阅读 · 0 评论 -
AttributeError: module ‘numpy‘ has no attribute ‘int‘.
复现代码过程中遇到错误:AttributeError: module 'numpy' has no attribute 'int'.这是因为在Numpy 1.2.0版本中就已经弃用了这个用法:np.int。原创 2024-05-04 16:50:17 · 330 阅读 · 1 评论 -
AttributeError: module ‘numpy‘ has no attribute ‘int‘.
运行代码过程中报错:AttributeError: module 'numpy' has no attribute 'int'.重新安装numpy(不推荐,修改版本号可能会引发其他代码错误)在numpy版本更新时 numpy.int 在。原创 2024-04-03 12:48:58 · 246 阅读 · 0 评论 -
‘bash‘ 不是内部或外部命令,也不是可运行的程序或批处理文件
'bash' 不是内部或外部命令,也不是可运行的程序。安装完毕后,再运行bash的命令就可以了。原创 2024-03-29 13:16:49 · 786 阅读 · 2 评论 -
ERROR: No matching distribution found for tb-nightly
安装tb-lightly失败:ERROR: No matching distribution found for tb-nightly。因为我的镜像源默认是清华的,但是pip源中没有对应的“tb-nightly”依赖包。原创 2024-03-29 12:52:51 · 1353 阅读 · 0 评论 -
ValueError: Cannot load file containing pickled data when allow_pickle=False
遇到报错:ValueError: Cannot load file containing pickled data when allow_pickle=False经过查阅有人说是与numpy的版本有关,但是还是不要轻易改变环境中的版本,不一定哪个地方就会报错。原创 2024-03-27 12:50:29 · 1050 阅读 · 1 评论 -
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
代码运行过程中报错:OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.原创 2024-03-27 11:10:30 · 364 阅读 · 0 评论 -
Win环境下安装 torch==1.1.0
复现很多模型的时候,会遇到torch版本不一致问题,尤其是torch1.1.0一直都在安装错误,试了很多方法都没用。原创 2024-03-26 12:49:31 · 424 阅读 · 0 评论 -
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
【代码】ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly。原创 2024-03-24 15:25:58 · 274 阅读 · 0 评论 -
AttributeError: ‘_MSDataLoaderIter‘ object has no attribute ‘_put_indices‘
复现代码过程中遇到错误:AttributeError: '_MSDataLoaderIter' object has no attribute '_put_indices'原创 2024-03-24 15:14:43 · 259 阅读 · 0 评论 -
ImportError: cannot import name ‘_DataLoaderIter‘ from ‘torch.utils.data.dataloader‘
这是由于torch版本问题引发的错误,pytorch环境是torch1.1.0可以不用修改。其中这个问题之前也遇到过,但是忘记是哪个模型了。原创 2024-03-24 13:30:39 · 590 阅读 · 1 评论 -
The “freeze_support()“ line can be omitted if the program is not going to be frozen
在运行代码过程中,遇到过好几次这种Error,但是每次都忘记,需要记录一下:The "freeze_support()" line can be omitted if the program is not going to be frozen。原创 2024-03-13 17:17:24 · 269 阅读 · 0 评论 -
ModuleNotFoundError: No module named ‘IPython‘
代码运行过程中遇到问题:ModuleNotFoundError: No module named 'IPython'然后再进行测试,可以看到已经安装成功。原创 2024-03-11 15:31:45 · 504 阅读 · 0 评论 -
ImportError: cannot import name ‘compare_ssim‘ from ‘skimage.measure‘,(compare_psnr)
升级后改变了库函数的结构,函数 skimage.measure.compare_ssim已经被 skimage.metrics.structural_similarity 取代。代码运行过程中报错:ImportError: cannot import name 'compare_ssim' from 'skimage.measure'原创 2024-03-11 15:24:41 · 213 阅读 · 0 评论 -
解决 NoneType‘ object has no attribute ‘astype’ 问题
在代码运行过程中报错:AttributeError: ‘NoneType‘ object has no attribute ‘astype‘。原创 2024-03-10 19:00:16 · 812 阅读 · 0 评论 -
ForkingPickler(file, protocol).dump(obj) TypeError: can‘t pickle Environment objects
因为windows操作系统的原因,在Windows中,多进程multiprocessing使用的是序列化pickle来在多进程之间转移数据,而socket对象是不能被序列化的,但是在linux操作系统上却没问题,因为在linux上多进程multiprocessing使用的是fork,所以在windows上可以改用多线程。因为网络通信属于io密集型的操作,对cpu计算要求不高,不用多进程,用多线程就行。,记得无论是参数设置还是数据集读取处理的代码,都要重新设置。原创 2024-03-10 14:49:57 · 332 阅读 · 1 评论 -
ImportError: cannot import name ‘_update_worker_pids’ from ‘torch._C’
1. 如果你的python版本小于3.7,那你就可以不用下载新的python,则你直接进行这一步的操作。(查看自己python的版本可以在命令行输入 python -V)在复现超分辨率算法RNAN(EDSR、RCAN同样的环境)的时候报错,torch要求是0.4.0版本的。2. 新建python的环境 3.6.5(python的版本不能大于3.6)3. 进入Your_project_name 项目。要指定路径安装,不然 version==0.4.0。4. 安装torch(0.4.0版本)原创 2024-03-01 14:35:16 · 356 阅读 · 0 评论 -
ERROR: No matching distribution found for skimage
安装环境的时候遇到错误:ERROR: No matching distribution found for skimage。(之前遇到过很对次这个Error,但是一直忘记)可以替换为阿里镜像源:pip install。当运行代码的时候,提示。原创 2024-03-01 12:49:57 · 487 阅读 · 0 评论 -
Mamba 环境安装:causal-conv1d和mamba-ssm报错解决办法
在执行命令pip install causal_conv1d和 mamba_ssm 出错原创 2024-03-01 10:26:35 · 5753 阅读 · 3 评论 -
RuntimeError: CUDNN_STATUS_EXECUTION_FAILED
与cuda版本不对,需要重新安装。不过我在复现代码的时候一般是要求特定的环境,不然会有其他错误,所以选择其他解决办法。原创 2024-02-24 18:45:57 · 533 阅读 · 0 评论 -
AttributeError: module ‘scipy.misc‘ has no attribute ‘imread‘,imresize,imsave等问题
原因解答:原因是scipy在新版本中misc库中弃用了一部函数,其中就包括imread,imresize和imsave。原创 2024-02-24 17:52:30 · 409 阅读 · 0 评论 -
ERROR: No matching distribution found for json
大多数博文分享是:①网络问题,换国内镜像;②更新pip.原创 2024-02-22 15:40:47 · 589 阅读 · 0 评论 -
ERROR: Cannot find command ‘git‘ - do you have ‘git‘ installed and in your PATH?
在执行pip install git+https://github.com/szagoruyko/pyinn.git@master命令时报错。下载完毕后接着执行下载命令即可。原创 2024-02-22 15:28:51 · 270 阅读 · 0 评论 -
conda 进入虚拟环境命令报错
conda-script.py: error: argument COMMAND: invalid choice: ‘activate‘原创 2024-02-20 17:28:58 · 702 阅读 · 0 评论 -
运行tensorboard报错:ValueError: Duplicate plugins for name projector
【代码】运行tensorboard报错:ValueError: Duplicate plugins for name projector。原创 2024-01-20 19:32:03 · 679 阅读 · 0 评论 -
KeyError: “No object named ‘BSRN‘ found in ‘arch‘ registry!“
在运行BSRN模型时候遇到错误。原创 2024-01-20 16:27:54 · 648 阅读 · 0 评论