NeRF代码调试

错误1:TypeError: read() got an unexpected keyword argument ‘ignoregamma’

问题原因:这个错误是由于 imageio.imread() 函数不支持 ignoregamma 参数导致的。根据报错信息,使用的 imageio 版本较低并且不支持该参数。

解决方法:

有几种方法可以尝试:

1.升级 imageio 包:尝试升级 imageio 包到最新版本,使用以下命令

pip install --upgrade imageio

2.使用更旧的 imageio 版本:如果升级 imageio 不起作用,你可以尝试使用较旧的 imageio 版本,该版本支持 ignoregamma 参数。你可以通过以下命令安装指定版本的 imageio:

pip install imageio==2.9.0

参考:https://blog.csdn.net/qq_46684028/article/details/132722953?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522170134106716800182750881%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=170134106716800182750881&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduend~default-1-132722953-null-null.142v96pc_search_result_base9&utm_term=TypeError%3A%20read%28%29%20got%20an%20unexpected%20keyword%20argument%20ignoregamma&spm=1018.2226.3001.4187

错误2:RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

解决办法:先卸载pytorch再安装
pip uninstall torch
pip install torch

之后显示Requirement already satisfied: setuptools in /home/uriky/anaconda3/envs/nerf/lib/python3.7/site-packages (from nvidia-cublas-cu1111.10.3.66->torch) (65.6.3)
Requirement already satisfied: wheel in /home/uriky/anaconda3/envs/nerf/lib/python3.7/site-packages (from nvidia-cublas-cu11
11.10.3.66->torch) (0.38.4)
Installing collected packages: nvidia-cuda-runtime-cu11, nvidia-cuda-nvrtc-cu11, nvidia-cublas-cu11, nvidia-cudnn-cu11, torch
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.12.0 requires torch==1.11.0, but you have torch 1.13.1 which is incompatible.
Successfully installed nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11-11.7.99 nvidia-cudnn-cu11-8.5.0.96 torch-1.13.1
(nerf) uriky@uriky-System-Product-Name:~/nerf-pytorch-master$ python run_nerf.py --config configs/fern.txt
随后输入python run_nerf.py --config configs/fern.txt,没有报错反而训练中

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值