由于TensorFlow在我机器上运行得非常好,我假设环境配置正确。可能存在哪些问题以及如何解决?results = self.detector.object_detection(images = [ori_img], use_gpu = self.use_gpu, score_thresh = self.threshold, visualization=False) File "/home/user/anaconda3/lib/python3.7/site-packages/paddlehub/compat/paddle_utils.py", line 220, in runner return func(*args, **kwargs) File "/home/user/.paddlehub/modules/yolov3_resnet50_vd_coco2017/module.py", line 211, in object_detection [image_tensor, im_size_tensor]) OSError: (External) Cublas error,
CUBLAS_STATUS_INVALID_VALUE . An unsupported value or parameter was passed to the function (a negative vector size, for example). (at /paddle/paddle/fluid/platform/cuda_helper.h:93)
9条答案
按热度按时间xiozqbni1#
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网API文档 、 常见问题 、 历史Issue 、 AI社区 来寻求解答。祝您生活愉快~
嗨!我们已经收到了您的问题,请耐心等待技术人员的回复。请确保您提供了足够的信息来演示您的请求。您还可以通过查看 API 、 FAQ 、 Github Issue 和 AI community 来获取答案。祝您度过愉快的一天!
zysjyyx42#
这是PaddleHub的问题。
result = predictor.object_detection(images=[cv2.imread('best-face-oil.png')], use_gpu=True)
AttributeError: 'YOLOv3ResNet50Coco2017' 对象没有 'gpu_predictor' 属性
不知道为什么不能使用GPU进行预测。
yfwxisqw3#
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网API文档 、 常见问题 、 历史Issue 、 AI社区 来寻求解答。祝您生活愉快~
你好!我们已经收到了你的问题,请耐心等待技术人员的回复。请确保你提供了足够的信息来演示你的需求。你也可以查看 API 、 FAQ 、 Github Issue 和 AI community 来获取答案。祝你度过愉快的一天!
开发者,我今天遇到了同样的问题。这是我的日志。我的Paddle版本是2.0.1.post110
jvlzgdj94#
你好,大家好,我只是想发一个备忘录,PyTorch在我机器上运行得很好。顺便说一下,我发现叶教授和我都使用了python3.7或conda环境。这会不会导致这个问题?叶教授,你之前尝试过用docker运行这段代码吗?最后,非常感谢:)
2021-03-23 19:39:14,"Jeffery Ye" ***@***.***>写道:既然TensorFlow在我机器上运行得很好,我假设环境配置正确。可能存在什么问题,我该如何解决?
results = self.detector.object_detection(images = [ori_img], use_gpu = self.use_gpu, score_thresh = self.threshold, visualization=False)
文件 "/home/user/anaconda3/lib/python3.7/site-packages/paddlehub/compat/paddle_utils.py",第220行,在runner中返回func(*args, **kwargs)
文件 "/home/user/.paddlehub/modules/yolov3_resnet50_vd_coco2017/module.py",第211行,在object_detection函数中[image_tensor, im_size_tensor])
OSError: (External) Cublas错误,CUBLAS_STATUS_INVALID_VALUE。传递给函数的参数或值不受支持(例如,传递了一个负向量大小)。(at /paddle/paddle/fluid/platform/cuda_helper.h:93)——你收到这个错误是因为你注解了。直接回复此邮件、查看GitHub或取消订阅。
xggvc2p65#
请问您使用的是PaddlePaddle、PaddleHub、Python、cuDNN和CUDA的哪个版本呢?
我验证时使用的是paddlepaddle-gpu=2.0.1, paddlehub=2.0.0, cuda=10.2, cudnn=7.6.5, python=3.8.5,没有出现您说的问题。验证脚本及验证方法:
在命令行输入
CUDA_VISIBLE_DEVICES=0 python test.py
目前您存在的问题初步判定有两个方面,环境配置有问题,PaddlePaddle和CUDA的版本及cuDNN版本不匹配,第二种是在执行时没有设定好CUDA_VISIBLE_DEVICES。
bvk5enib6#
这个问题确实是由于版本不匹配导致的。版本号不能有较大的差异,即使是次要版本号也不行。请仔细阅读其文档,并按照文档中的说明进行操作,因为文档的编写并不是很好。总的来说,它的配置比TensorFlow要难得多。我认为平台有责任输出更多有用的信息来进行调试(我想检查不匹配很容易)。
exdqitrt7#
这个问题实际上是由于版本不匹配导致的。版本号不能有较大的差异,即使是次要版本号也不行。请仔细阅读其文档,并按照文档中的说明进行操作,因为文档的编写并不是很好。总的来说,配置方面比TensorFlow要难得多。我认为平台有责任输出更多有用的信息来进行调试(我想检查不匹配很容易)。虽然这个问题已经解决了,但这个帖子无法为其他用户提供任何有用的信息。当你遇到问题时,这会让Paddle变得难以使用。
ewm0tg9j8#
这个问题是由于在PaddlePaddle框架中使用CuBLAS库时,传入了一个不支持的参数导致的。具体来说,是在创建参数时,传入了一个负向量大小。为了解决这个问题,你需要检查你的代码,确保传入的参数是正确的。如果你使用的是预训练模型,你可以尝试更新PaddlePaddle和相关依赖库到最新版本。
9vw9lbht9#
我遇到了相同的问题:
2022-04-29 18:05:40 [INFO] Starting to read file list from dataset... 2022-04-29 18:05:40 [INFO] 1981 samples in file MyDataset/train.json, including 1981 positive samples and 0 negative samples. loading annotations into memory... Done (t=0.07s) creating index... index created! 2022-04-29 18:05:40 [INFO] Starting to read file list from dataset... 2022-04-29 18:05:40 [INFO] 495 samples in file MyDataset/val.json, including 495 positive samples and 0 negative samples. W0429 18:05:40.970075 12979 device_context.cc:404] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.0, Runtime API Version: 11.0 W0429 18:05:40.975056 12979 device_context.cc:422] device: 0, cuDNN Version: 7.6. Traceback (most recent call last): File "train.py", line 38, in model = pdx.det.FasterRCNN(num_classes=num_classes, backbone='ResNet101') File "/root/.local/lib/python3.7/site-packages/paddlex/cv/models/detector.py", line 854, in init dcn_v2_stages=dcn_v2_stages) File "/root/.local/lib/python3.7/site-packages/paddlex/cv/models/detector.py", line 100, in _get_backbone backbone = getattr(ppdet.modeling, backbone_name)(**params) File "/root/.local/lib/python3.7/site-packages/paddlex/ppdet/modeling/backbones/resnet.py", line 528, in init lr=1.0)) File "/root/.local/lib/python3.7/site-packages/paddlex/ppdet/modeling/backbones/resnet.py", line 69, in init bias_attr=False) File "/root/.local/lib/python3.7/site-packages/paddle/nn/layer/conv.py", line 646, in init data_format=data_format) File "/root/.local/lib/python3.7/site-packages/paddle/nn/layer/conv.py", line 135, in init default_initializer=_get_default_param_initializer()) File "/root/.local/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 412, in create_parameter default_initializer) File "/root/.local/lib/python3.7/site-packages/paddle/fluid/layer_helper_base.py", line 374, in create_parameter **attr._to_kwargs(with_initializer=True)) File "/root/.local/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2895, in create_parameter initializer(param, self) File "/root/.local/lib/python3.7/site-packages/paddle/fluid/initializer.py", line 366, in call stop_gradient=True) File "/root/.local/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2925, in append_op kwargs.get("stop_gradient", False)) File "