issues
文章平均质量分 64
Adenialzz
Keep Learning.
展开
-
关于pytorch使用多个dataloader并使用zip和cycle来进行循环时出现的显存泄漏的问题
关于pytorch使用多个dataloader并使用zip和cycle来进行循环时出现的显存泄漏的问题如果我们想要在 Pytorch 中同时迭代两个 dataloader 来处理数据,会有两种情况:一是我们按照较短的 dataloader 来迭代,长的 dataloader 超过的部分就丢弃掉;二是比较常见的,我们想要按照较长的 dataloader 来迭代,短的 dataloader 在循环完一遍再循环一遍,直到长的 dataloader 循环完一遍。两个dataloader的写法及问题的出现第一种原创 2022-05-20 10:14:04 · 3491 阅读 · 5 评论 -
docker gpu报错Error response from daemon: could not select device driver ““ with capabilities: [[gpu]]
Docker容器中使用Nvidia GPU报错 docker: Error response from daemon: could not select device driver “” with capabilities: [[gpu]].问题出现我们知道,想要在 docker19 及之后的版本中使用 nvidia gpu 已经不需要单独安装 nvidia-docker 了,这已经被集成到了 docker 中。相必大家也知道,要使用宿主机的 GPU,需要在 docker run 的时候添加 --gp原创 2022-03-26 18:14:18 · 26945 阅读 · 17 评论 -
tensorboard报错:ValueError Duplicate plugins for name projector 问题的出现及解决过程
tensorboard报错:ValueError: Duplicate plugins for name projector 问题的出现及解决过程记录如题问题的出现及解决过程。报错命令及信息笔者在终端调用 tensorboard 时:tensorboard --logdir=runs/ --bind_all报错:raise ValueError('Duplicate plugins for name %s' % plugin.plugin_name)ValueError: Duplicate原创 2022-03-05 11:31:01 · 5499 阅读 · 4 评论 -
protobuf版本常见问题
protobuf版本常见问题许多软件都依赖 google 的 protobuf,我们很有可能在安装多个软件时重复安装了多个版本的 protobuf,它们之间很可能出现冲突并导致在后续的工作中出现版本不匹配之类的错误。本文将讨论笔者在使用 protobuf 中遇到的一些问题,以及最终的解决方案,持续更新。读者遇到其他的版本问题的报错也欢迎留言讨论。protobuf的安装方式Linux系统级安装sudo apt-get install libprotobuf-dev protobuf-compile原创 2022-01-06 22:48:55 · 28728 阅读 · 4 评论 -
Libtorch报错:terminate called after throwing an instance of ‘c10::Error‘ what():isTensor()INTERNAL ASS
Libtorch报错:terminate called after throwing an instance of ‘c10::Error’ what(): isTensor() INTERNAL ASSERT FAILED报错问题出现在笔者想要将 yolov5 通过 PyTorch 的 C++ 接口 Libtorch 部署到树莓派上。完整报错信息:terminate called after throwing an instance of 'c10::Error' what(): isT原创 2021-12-23 20:12:06 · 6259 阅读 · 0 评论 -
RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one.
RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one.报错信息报错信息:RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has pa原创 2021-09-19 21:45:12 · 15279 阅读 · 6 评论 -
strict=False 但还是size mismatch for []: copying a param with shape [] from checkpoint,the shape in cur
strict=False 但还是size mismatch for []: copying a param with shape [] from checkpoint,the shape in cur问题我们知道通过model.load_state_dict(state_dict, strict=False)可以暂且忽略掉模型和参数文件中不匹配的参数,先将正常匹配的参数从文件中载入模型。笔者在使用时遇到了这样一个报错:RuntimeError: Error(s) in loading stat原创 2021-09-03 15:42:42 · 11424 阅读 · 21 评论 -
TabError- inconsistent use of tabs and spaces in indentation 查验及解决方法
TabError: inconsistent use of tabs and spaces in indentation 查验及解决方法报错代码def eccv16(pretrained=True): model = ECCVGenerator() if(pretrained): import torch.utils.model_zoo as model_zoo model.load_state_dict(torch.load('/home/ps/.cache/torch/hub/check原创 2021-09-02 16:39:24 · 301 阅读 · 0 评论 -
Shell脚本多行换行报错:- unrecognized arguments- \
shell error: unrecognized arguments: \在使用linux长命令时,我们通常会用一个shell脚本加\分行的形式来更清晰展示参数。这时有一个注意事项:在\后必须紧跟回车, 否则会导致后面的参数无法传入。因为这时程序会将后面的参数算作一条新命令。本文要说的不是这个问题,而是另一个笔者在使用多换行的shell脚本过程中遇到的另一个问题。笔者当时运行的脚本(简化了大部分参数)如下:python mb_ae_act.py \--ch_p 2 \--batchSize0原创 2021-08-22 15:39:38 · 3809 阅读 · 1 评论 -
VS Code的Error: Running the contributed command: ‘_workbench.downloadResource‘ failed解决
VS Code的Error: Running the contributed command: '_workbench.downloadResource' failed解决 转自:https://blog.csdn.net/ibless/article/details/118...转载 2021-08-14 10:58:04 · 667 阅读 · 0 评论 -
RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader failed reading zip arc
RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader failed reading zip archive: failed finding central directory这个报错是出现在PyTorch在读入模型参数时:checkpoint = torch.load(args.resume, map_location='cpu')笔者之前在训练模型,突然服务器整个停掉,发现竟然是系统固态硬盘没有空原创 2021-08-11 16:22:45 · 20964 阅读 · 12 评论 -
关于PyTorch中的register_forward_hook()函数未能执行其中hook函数的问题
关于PyTorch中的register_forward_hook()函数未能执行其中hook函数的问题Hook 是 PyTorch 中一个十分有用的特性。利用它,我们可以不必改变网络输入输出的结构,方便地获取、改变网络中间层变量的值和梯度。这个功能被广泛用于可视化神经网络中间层的 feature、gradient,从而诊断神经网络中可能出现的问题,分析网络有效性。Hook函数机制:不改变主体,实现额外的功能,像一个挂件一样;Hook函数本身不是本文介绍的重点,本文主要是记录一下笔者在使用hook函数时原创 2021-08-03 16:09:02 · 2257 阅读 · 3 评论 -
在导入NVIDIA的apex库时报错 ImportError cannot import name ‘UnencryptedCookieSessionFactoryConfig‘ from
在导入NVIDIA的apex库时报错 ImportError: cannot import name ‘UnencryptedCookieSessionFactoryConfig’ from ‘pyramid.session’ (unknown location)报错在使用NVIDIA的apex库时报错 ImportError: cannot import name ‘UnencryptedCookieSessionFactoryConfig’ from ‘pyramid.session’ (unkno原创 2021-07-15 20:14:48 · 23141 阅读 · 12 评论