
掉过的坑
there2belief
这个作者很懒,什么都没留下…
展开
-
GDAL错误:ImportError: libpoppler.so.126: cannot open shared object file: No such file or directory
libpoppler.so.126文件缺失了,查找网上解决办法知道需要下载正确的poppler库。的解答办法,下载libpoppler.so.126文件,上传到服务器指定位置/home/XXXX/anaconda3/envs/XXXX/lib/下,解决问题。原文链接:https://blog.youkuaiyun.com/m0_62443558/article/details/142880775。conda直接安装 gdal后使用报错,下载的gdal版本是3.6.2。在Python环境下导入gdal。转载 2024-10-26 16:40:24 · 283 阅读 · 0 评论 -
NVIDIA驱动失效简单解决方案:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver.
机器已经安装nvidia驱动,且正常使用,重启后找不到显卡驱动打开终端,用nvidia-smi查看一下,发现如下报错:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.查看发现系统中的显卡驱动自动升级了,重启后没有正常找到驱动发现驱动是存在的,于是进行下一步比原创 2024-04-26 11:34:19 · 3111 阅读 · 0 评论 -
修复移动硬盘显示盘符但打不开问题
移动硬盘显示盘符,但无法打开。点击属性不显示磁盘使用信息。原创 2024-01-03 22:47:00 · 2494 阅读 · 0 评论 -
【mmrotate】*** is not in the task util registry
使用mmrotate-1.x 自定义类时,明明已经注册,并添加到__init__.py中,但提示没有注册。原创 2023-11-09 22:38:43 · 392 阅读 · 0 评论 -
【错误】 undefined symbol: cublasLtHSHMatmulAlgoInit, version libcublasLt.so.11
pip安装完pytorch=1.13.1后,build代码时出错:原因因为pytorch1.13安装时会给我们自动安装但由于一般用户已经安装CUDAtoolkit,所以会产生这个错误。原创 2023-10-17 15:54:20 · 1190 阅读 · 3 评论 -
timm错误features_only not implemented for Vision Transformer models.
使用timm的ViT模型时出错:features_only not implemented for Vision Transformer models.原创 2023-06-05 19:05:17 · 553 阅读 · 0 评论 -
MMRotate注册模型无法使用,提示is not in the model registry
使用MMRotate注册了backbone模型后,发现无法使用,出现错误:模型中的伪代码如下:(这里是mmrotate-1.x/mmdet-3.x,用法与mmrotate-0.x/mmdet-2.x不同)原创 2023-05-24 16:17:09 · 2288 阅读 · 1 评论 -
【nvidia-smi报错】Failed to initialize NVML: Driver/library version mismatch
使用nvidia-smi命令查看显卡状态时,出现错误:而使用nvcc -V查看cuda版本时,显示正常。原创 2023-05-19 09:39:45 · 782 阅读 · 0 评论 -
Windows柯尼卡打印机驱动安装
Windows柯尼卡打印机驱动安装原创 2022-12-23 09:38:31 · 3614 阅读 · 0 评论 -
【Python】TypeError: __init__() takes 1 positional argument but 2 were given
TypeError: __init__() takes 1 positional argument but 2 were given。看代码感觉定义了dict参数后,使用**传参,感觉没问题但却报错了。跟代码发现定义的dict传参时实际是一个tuple,tuple里的元素是dict,因此修改以上代码传参部分。原创 2022-10-17 13:05:12 · 1775 阅读 · 0 评论 -
【PyTorch】CUDA error: device-side assert triggered
pytorch训练时,遇到错误中断CUDA error: device-side assert triggered,按照后面的提示增加环境变量CUDA_LAUNCH_BLOCKING=1原创 2022-08-26 09:44:49 · 1582 阅读 · 0 评论 -
【Tensorflow】AttributeError: module ‘keras.backend‘ has no attribute ‘tf‘
AttributeError: module 'keras.backend' has no attribute 'tf'在keras 2.3.1中已经没有 keras.backend.tf方法了,此时可以直接使用tf代替keras.backend.tf原创 2022-07-29 15:47:09 · 3231 阅读 · 0 评论 -
【Tensorflow】AttributeError: ‘_TfDeviceCaptureOp‘ object has no attribute ‘_set_device_from_string‘
AttributeError: '_TfDeviceCaptureOp' object has no attribute '_set_device_from_string'出现该错误的原因是两者版本不匹配,使用keras=2.2.4需要匹配的tensorflow版本,例如1.13.1。如果想用tensorflow1.15.0则可以使用keras=2.3.1。...原创 2022-07-29 15:27:34 · 504 阅读 · 0 评论 -
【Tensorflow】No OpKernel was registered to support Op ‘NcclAllReduce‘错误
问题:使用tf.distribute.MirroredStrategy时,在windows系统多卡下出现No OpKernel was registered to support Op 'NcclAllReduce'问题(Linux下正常),具体报错信息如下:tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'NcclAllRe...原创 2022-04-30 10:09:35 · 1912 阅读 · 1 评论 -
【TensorRT】TensorRT踩过的坑
1、TensorRT发布的模型(engine)不能跨平台使用例如linux发布的模型不能在windows下用。2、TensorRT发布的模型需要在相同GPU算力(compute capability)的情况下使用否则会导致compute capability不匹配问题,例如算力7.0发布的模型不能在7.5上用。查询显卡算力:CUDA GPUs | NVIDIA Developer3、TensorRT发布的模型需要在匹配的CUDA和cudnn环境下用TensorRT本身有严格.原创 2022-04-15 16:15:10 · 5846 阅读 · 1 评论 -
python编译后程序执行出现中文乱码问题
问题:使用IDE中英文路径读写文件没有问题,但程序编译后或使用命令行执行py文件时,出现中文乱码。原因:Python idle 中utf-8、gbk或者unicode这三种编码都支持,但windows cmd 窗口下不支持utf-8,想要显示中文必须转换为gbk或者unicode。简单解决:在py文件中声明gbk编码其他方案包括:文件存储为utf-8格式,编码声明为utf-8,# encoding:utf-8 出现汉字的地方前面加u 不同编码之间不能直接转换,要经过unic.原创 2022-04-02 18:31:17 · 3179 阅读 · 0 评论 -
shell执行python找不到自定义包的问题
使用IDE时可以正常导入文件夹形式的包,但是shell脚本执行时无法找到文件夹形式的包,仅能识别环境里的包。例如,工程结构为:train.pymmseg # 文件夹包py文件中包含代码import mmseg使用shell脚本执行:python train.py ***会报错:ModuleNotFoundError: No module named 'mmseg'这是因为:python找包的路径是:python安装路径下的lib包和PYTHONPATH下的包,而当原创 2022-03-31 15:14:08 · 2865 阅读 · 2 评论 -
MMSeg错误:RuntimeError: Default process group has not been initialized
在使用mmSegmentation框架时遇到的问题:File "C:\software\Anaconda3\envs\python36\lib\site-packages\torch\distributed\distributed_c10d.py", line 347, in _get_default_group raise RuntimeError("Default process group has not been initialized, "RuntimeError: Default..转载 2022-03-21 17:01:09 · 6372 阅读 · 1 评论 -
keras.callbacks使用TensorBoard不支持字典元素
keras.callbacks使用TensorBoard时,如果logs里有字典元素是不支持的,例如下面代码里的logs['b'],此时如果想使用TensorBoard正常记录日志,需要将字典元素转成单值元素。例如,这里将字典元素里的每个子元素提取出来生成新的字典,并与原字典的非字典元素合并。logs = {'a': 0.1, 'b': { 'b1': 1.1, 'b2': 1.2, } }dict原创 2022-01-20 10:39:10 · 686 阅读 · 0 评论 -
json写入问题:TypeError: Object of type float32 is not JSON serializable
问题:字典数据写入json文件时,遇到标题错误分析:字典格式化写入json不支持np类型float32,类似还有np.int32、np.array等解决:转换np类型为python类型np.float32 -> floatimport numpy as npa = 1.0998777a = np.float32(a)print(type(a))查看到输出类型:<class 'numpy.float32'>强制转换a = float(原创 2021-12-03 09:28:31 · 11989 阅读 · 0 评论 -
解决ERROR: *** is not a supported wheel on this platform
问题分析:pip安装whl时出现错误:ERROR: *** is not a supported wheel on this platform这是因为pip会根据whl的命名校验是否适合当前环境,两种情况可能导致该错误:1、环境适配,但是由于自行修改过whl的命名导致校验不通过;2、whl和环境不适配。解决方案:对于1,改名即可;对于2,参考如下方案。【2021新教程】解决is not a supported wheel on this platform-解决pip has原创 2021-11-22 13:14:06 · 4875 阅读 · 3 评论 -
问题:Failed to get convolution algorithm. This is probably because cuDNN failed to initialize
I've seen this error message for three different reasons, with different solutions:1. You have cache issuesI regularly work around this error by shutting down my python process, removing the~/.nvdirectory (on linux,rm -rf ~/.nv), and restarting the ...转载 2021-11-01 18:38:24 · 243 阅读 · 0 评论 -
allow_growth控制tensorflow显存动态增长 无效问题
问题:tensorflow1.15环境使用config.gpu_options.allow_growth = True,控制显存动态增长,发现无效,显存仍然会被完全占用config = tf.ConfigProto()config.gpu_options.allow_growth = Truetf.keras.backend.set_session(tf.Session(config=config))分析:暂未找到原因,类似问题:gpu_options doesn't work · Issue原创 2021-09-10 18:12:51 · 2756 阅读 · 1 评论 -
windows系统下conda正常安装gdal后import gdal导入出错:ImportError: DLL load failed
问题:ImportError: DLL load failed: The specified procedure could not be found.分析:解决:Python Extension Packages for Windows - Christoph Gohlke (uci.edu)原创 2021-09-07 11:17:04 · 1378 阅读 · 0 评论 -
Error running docker container: starting container process caused “exec: \“python\“: executable file
问题:miniconda3虚拟环境创建python环境,使用下面Dockerfile编译docker镜像FROM cuda10.2_pt1.5:09061COPY . /workspaceWORKDIR /workspaceCMD ["python","run.py","/input_path","/output_path"]使用时出错:docker: Error response from daemon: OCI runtime create failed: container_li原创 2021-09-07 11:10:14 · 3930 阅读 · 0 评论 -
解决AttributeError: module ‘keras.utils.generic_utils‘ has no attribute ‘populate_dict_with_module**
问题:使用keras 2.2.4和tensorflow2.5组合时,import keras出现错误AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'分析:版本适配性导致问题解决方案:可以使用tf自带的keras或降低tensorflow版本与keras相匹配,例如使用tensorflow=1.13.1版本...原创 2021-09-03 16:14:56 · 6838 阅读 · 0 评论 -
WARNING:tensorflow:`add_update` `inputs` kwarg has been deprecated.
Tensorfow 2.1+版本add_update函数已经弃用inputs参数,重新该方法时注意不使用该参数WARNING:tensorflow:`add_update` `inputs` kwarg has been deprecated. You no longer need to pass a valhttps://github.com/tensorflow/tensorflow/blob/r2.1/tensorflow/python/keras/engine/base_layer.py原创 2021-07-28 16:11:26 · 733 阅读 · 0 评论 -
3090显卡深度学习无法加速
win下可能原因之一:原创 2021-07-19 13:03:48 · 1213 阅读 · 0 评论 -
You are using ptxas 8.x, but TF requires ptxas 9.x (and strongly prefers >= 9.2.88). Compilation of
TF2.0 ptxas ignores PATH · Issue #33375 · tensorflow/tensorflow (github.com)The workaround for this particular problem on unix-based machines is to link your cuda bin to your working directory. Go to the directory, where you launch your python code and c转载 2021-07-17 09:13:47 · 1727 阅读 · 0 评论 -
tensorflow无法正常使用显卡,错误Couldn‘t invoke ptxas.exe --version
环境信息:显卡 2080ticudatoolkit(version11.0.221)cuDNN(version8.0.4tensorflow-gpu(version2.4.1).问题:使用编译的tensorflow.dll预测时,cuda和cudnn正常加载,但出现错误无法正常使用GPU。错误信息为:2021-07-16 19:17:09.091737: I tensorflow/stream_executor/platform/default/dso_loade...原创 2021-07-17 09:11:59 · 9944 阅读 · 4 评论 -
Keras fit_generator中的max_queue_size, workers, use_multiprocessing设置
Keras Model.fit_generator中这三个参数的说明max_queue_size: maximum size of the internal training queue which is used to "precache" samples from the generator 预缓存的最大队列数量 workers: number of threads generating batches in parallel. Batches are computed i原创 2021-07-15 13:46:57 · 2648 阅读 · 0 评论 -
错误:Output tensors to a Model must be the output of a TensorFlow `Layer`
使用tf.keras.models.Model()构建模型时遇到错误:Output tensors to a Model must be the output of a TensorFlow `Layer`出错环境是Tensorflow 1.x 在Tensorflow 2中正常,这里出错的原因是因为代码中混用了keras或tf.keras和tf的一些函数(层)。比如:inputs = keras.layers.Input(shape=(256,))embed1 = keras.laye原创 2021-07-08 13:19:30 · 2402 阅读 · 0 评论 -
TypeError: float() argument must be a string or a number, not ‘Dimension‘
Keras中运行 input.shape得到的变量与float、int等类型的操作时会报错,例如in_channel = inputs.shape[channel_axis]x = conv_layer(x, filter=in_channel*0.5, kernel=[1,1], layer_name=scope+'_conv1')在低版本keras中这里inputs.shape得到的类型是Dimension,与其他类型运算会报错,注意转换到int类型in_channel = int(i原创 2021-07-08 09:25:59 · 2192 阅读 · 0 评论 -
错误:AttributeError: module ‘keras.backend.tensorflow_backend‘ has no attribute ‘_is_tf_1‘
使用tensorflow+keras时出现错误:AttributeError: module 'keras.backend.tensorflow_backend' has no attribute '_is_tf_1'可能是环境出问题导致的,推荐是卸载重新安装keras,同时要注意选择和tensorflow版本匹配的keras,如果不清楚版本可以使用conda安装推荐的版本。pip uninstall keraspip install keras --upgrade...原创 2021-04-25 14:44:01 · 2006 阅读 · 0 评论 -
解决word无法回退及修改内容不保存问题
如图,撤退按钮瞬间会变灰。即便在未变灰前点击回退也不会有实际回退效果。出现这种情况很可能是模板文件出现损坏或有异常。可以通过删除模板文件让word重新自己生成模板文件来解决。操作步骤如下:step 1:打开资源管理器,在地址栏输入内容并回车:%appdata%\microsoft\Templates step 2:关闭word程序注:如果有word正在运行,需要先关闭运行中的word程序。如果word在后台运行需要打开任务管理器关闭word程序。step 3:删除...转载 2021-04-20 11:56:24 · 7788 阅读 · 3 评论 -
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
在PyCharm运行Python代码运行时出现错误导致退出:Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)139错误是Linux错误代码(参考Linux code error 139),异常导致某个进程崩溃产生的,可以出现在任何语言、程序中。其产生的原因也有很多,可能时内存泄漏、依赖的库版本不匹配、环境不满足等。在程序中只能debug逐步定位出错位置,揣测出错原因。附录几个导致出错的情况:内存泄漏原创 2021-03-09 10:36:10 · 45231 阅读 · 1 评论 -
geoio ImportError: libpoppler.so.71: cannot open shared object file: No such file or directory
问题:使用conda安装gdal后,在回滚变更环境后出错:geoio ImportError: libpoppler.so.71: cannot open shared object file: No such file or directory解决方案:conda install “poppler<0.62”https://github.com/ContinuumIO/anaconda-issues/issues/9449...原创 2021-03-02 14:35:16 · 1179 阅读 · 2 评论 -
pip安装opencv出错:No module named ‘skbuild‘
问题:pip安装opencv时出错:No module named 'skbuild'解决方案一(测试通过):pip install --upgrade pip解决方案二(未测试):sudo apt install cmakepip3 install scikit-build原创 2021-03-02 14:24:27 · 9640 阅读 · 0 评论 -
Win下编译pycocotools的Python API
1、下载pycocotools源码git clone https://github.com/cocodataset/cocoapi.git2、在需要编译的python环境下进行编译# 激活环境conda activate tf20coco# cd 到 目录cd C:\Users\dou\Desktop\cocoapi\PythonAPI# 进行编译python setup.py buildpython setup.py install3、build时出错invalid num原创 2020-12-31 10:34:47 · 294 阅读 · 0 评论 -
pyinstaller打包py脚本Warning:lib not found等相关问题
使用Pyinstaller打包py为exe文件以来,一直都会碰到Warning:lib not found等相关问题,诸如: 虽然大多数时候,您像我一样忽略这些warning,打包后的exe也能运行。网上有一堆的方法,有建议装win7的,也有建议换32位python文件的,有提示下载2G大小的相关SDK的。总之,就是pyinstaller对目前的win10支持不够友好!但是网上这些方法代价太高,那么不改win10 X64系统,不更改 python版本(3.6.4)的情况下,如何优雅地使用pyins转载 2020-12-02 12:00:23 · 1976 阅读 · 0 评论