bug
小镇大爱
这个作者很懒,什么都没留下…
展开
-
from torch.hub import HASH_REGEX ImportError: cannot import name ‘HASH_REGEX‘
将model_zoo.py下的5-7行改为:from torch.utils.model_zoo import _download_url_to_filefrom torch.utils.model_zoo import urlparsefrom torch.utils.model_zoo import HASH_REGEX原创 2020-12-01 11:30:18 · 1338 阅读 · 0 评论 -
配置maskrcnn-benchmark出现ImportError: cannot import name ‘_download_url_to_file‘
解决办法修改 maskrcnn_benchmark/utils/model_zool.py文件里的导入包,改为如下代码:from torch.hub import _download_url_to_filefrom torch.hub import urlparsefrom torch.hub import HASH_REGEX原创 2020-09-14 08:25:35 · 3375 阅读 · 1 评论 -
AttributeError: module ‘torch.jit‘ has no attribute ‘_script_if_tracing‘
更换torchversion版本到0.4.0输入如下命令pip uninstall torchvisionpip install torchvision==0.4.0 -fhttps://download.pytorch.org/whl/torch_stable.html原创 2020-09-13 23:54:58 · 10830 阅读 · 3 评论 -
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
解决方法:sudo apt updatesudo apt install libgl1-mesa-glx原创 2020-08-11 00:44:51 · 502 阅读 · 0 评论 -
no module named ‘apex‘
1、官方安装方法git clone https://github.com/NVIDIA/apex.gitcd apexpython setup.py install --cuda_ext --cpp_ext2、github上找到的方法(此方法成功了)git clone https://github.com/NVIDIA/apexcd apexpython3 setup.py install...原创 2020-08-11 00:25:25 · 7980 阅读 · 1 评论 -
解决 batch_sampler option is mutually exclusive with batch_size, shuffle, sampler, and drop_last
因为我再dataloader中传入了drop_last=True,就报错ValueError: batch_sampler option is mutually exclusive with batch_size, shuffle, sampler, and drop_last,看源码发现问题所在,因为参数设置的冲突导致,我设置batch_sampler这个参数,一旦指定了这个参数,那么batch_size,shuffle,sampler,drop_last就不能再制定了(互斥——Mutually exc.原创 2020-06-22 17:51:04 · 8032 阅读 · 0 评论 -
nvcc fatal : Unsupported gpu architecture 'compute_75'
Had the same problem and got to the bottom of it. My configuration is a Tesla T4 with 410.92 driver and CUDA 9.2, Ubuntu 18.10.The thing is, the torch installer tries for some reason to use the highe...原创 2020-05-01 00:37:21 · 1695 阅读 · 0 评论 -
ValueError: Buffer dtype mismatch, expected 'uint8_t' but got 'int'
在跑maskrcnn的测试代码时出现了这个错误ValueError: Buffer dtype mismatch, expected 'uint8_t' but got 'int'解决方法:maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/coco/coco_eval.py第147行 mask_...原创 2020-04-23 00:53:36 · 2792 阅读 · 0 评论 -
RuntimeError: empty is not implemented for type CUDABoolType
Actually, there are three places required to be modified listed as follows:1、maskrcnn_benchmark/structures/segmentation_mask.py2、maskrcnn_benchmark/modeling/balanced_positive_negative_sampler.py3、m...原创 2020-04-22 00:33:58 · 858 阅读 · 0 评论 -
python输出数组(print array)时中间出现省略号没有完全输出
输出一个列表,当列表长度过大时,可能会出现这种情况解决方法是:import numpy as npnp.set_printoptions(threshold=np.inf)即取消长度限制原创 2020-04-10 00:51:12 · 3884 阅读 · 1 评论 -
解决 : ModuleNotFoundError: No module named 'pycocotools._mask'
在配置coco api的时候遇到了这个问题。从GitHub下载coco源码,解压到任意文件夹。(或者创建一个工程)coco源码链接 https://github.com/cocodataset/cocoapi在cmd窗口,cd到PythonAPI目录,执行 python setup.py install可能遇见的问题: 找不到vcversall.bat,解决办法:安装Vis...原创 2020-04-07 23:28:48 · 17001 阅读 · 10 评论