question 4
AssertionError: type <class ‘str’> does not match original type <class ‘bool’>
question 5
/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
Environment variables with the ‘NUMBAPRO’ prefix are deprecated and consequently ignored, found use of NUMBAPRO_CUDA_DRIVER=/usr/lib/x86_64-linux-gnu/libcuda.so.
For more information about alternatives visit: (‘https://numba.pydata.org/numba-doc/latest/cuda/overview.html’, ‘#cudatoolkit-lookup’)
warnings.warn(errors.NumbaWarning(msg))
/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
Environment variables with the ‘NUMBAPRO’ prefix are deprecated and consequently ignored, found use of NUMBAPRO_NVVM=/usr/local/cuda-11.4/nvvm/lib64/libnvvm.so.
For more information about alternatives visit: (‘https://numba.pydata.org/numba-doc/latest/cuda/overview.html’, ‘#cudatoolkit-lookup’)
warnings.warn(errors.NumbaWarning(msg))
/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
Environment variables with the ‘NUMBAPRO’ prefix are deprecated and consequently ignored, found use of NUMBAPRO_LIBDEVICE=/usr/local/cuda-11.4/nvvm/libdevice.
For more information about alternatives visit: (‘https://numba.pydata.org/numba-doc/latest/cuda/overview.html’, ‘#cudatoolkit-lookup’)
warnings.warn(errors.NumbaWarning(msg))
/home/siat/work/object_detection/PointRCNN-master/tools/…/lib/config.py:187: YAMLLoadWarning: calling yaml.load() without Loader=… is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
yaml_cfg = edict(yaml.load(f))
Traceback (most recent call last):
File “eval_rcnn.py”, line 867, in
cfg_from_list(args.set_cfgs)
File “/home/siat/work/object_detection/PointRCNN-master/tools/…/lib/config.py”, line 240, in cfg_from_list
‘type {} does not match original type {}’.format(type(value), type(d[subkey]))
AssertionError: type <class ‘str’> does not match original type <class ‘bool’>
yaml.load(input, Loader=yaml.FullLoader)
请问这个问题如何解决,输入该语法yaml.load(input, Loader=yaml.FullLoader),显示出错
不知道你这个问题是否已经解决, 如果还没有解决的话:问题内容: 问题 4:AssertionError: 类型与原始类型不匹配。 问题 5:在导入PointRCNN模块时,出现以下错误警告:
/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
使用‘NUMBAPRO’前缀的环境变量已过时且被忽略,发现使用NUMBAPRO_CUDA_DRIVER=/usr/lib/x86_64-linux-gnu/libcuda.so。
有关替代方法的详细信息,请访问:('https://numba.pydata.org/numba-doc/latest/cuda/overview.html', '#cudatoolkit-lookup')
warnings.warn(errors.NumbaWarning(msg))
/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
使用‘NUMBAPRO’前缀的环境变量已过时且被忽略,发现使用NUMBAPRO_NVVM=/usr/local/cuda-11.4/nvvm/lib64/libnvvm.so。
有关替代方法的详细信息,请访问:('https://numba.pydata.org/numba-doc/latest/cuda/overview.html', '#cudatoolkit-lookup')
warnings.warn(errors.NumbaWarning(msg))
/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
使用‘NUMBAPRO’前缀的环境变量已过时且被忽悠,发现使用NUMBAPRO_LIBDEVICE=/usr/local/cuda-11.4/nvvm/libdevice。
有关替代方法的详细信息,请访问:('https://numba.pydata.org/numba-doc/latest/cuda/overview.html', '#cudatoolkit-lookup')
warnings.warn(errors.NumbaWarning(msg))
/home/siat/work/object_detection/PointRCNN-master/tools/../lib/config.py:187: YAMLLoadWarning:
调用yaml.load()而不带Loader=yaml.FullLoader是不安全的,默认Loader已不安全。
请阅读'https://msg.pyyaml.org/load'了解完整详细信息。
yaml_cfg = edict(yaml.load(f))
Traceback (most recent call last):
File "eval_rcnn.py", line 867, in
cfg_from_list(args.set_cfgs)
File "/home/siat/work/object_detection/PointRCNN-master/tools/../lib/config.py", line 240, in cfg_from_list
'type {} does not match original type {}'.format(type(value), type(d[subkey])))
AssertionError: 类型<class 'str'>与原始类型<class 'bool'>不匹配。
这个问题可能涉及到以下几个方面: 1. PointRCNN代码中断言(AssertionError)失败,类型与原始类型不匹配。 2. 导入PointRCNN模块时,出现numba和yaml的警告以及yaml加载函数引发的错误。
针对这两个问题,我提供以下解决方案:
AssertionError: 类型<class 'str'>与原始类型<class 'bool'>不匹配
这个问题出现在PointRCNN代码中的断言处,说明代码中某个地方期望一个布尔值(bool),但实际传入了一个字符串(str)。为了解决这个问题,你需要检查PointRCNN代码中与断言相关的代码,并确保传入正确的数据类型。
这些警告表明你的代码中使用了已过时或无效的环境变量NUMBAPRO,建议使用其它方法替代。这些警告不一定影响代码的正常运行,但你可以考虑以下方法来消除警告: - 检查代码中直接或间接使用了NUMBAPRO前缀的环境变量,并尝试使用相应的替代方法。具体可以参考警告中提供的链接了解详细信息。
这个警告表明你的代码中使用了不安全的加载方式yaml.load(),建议使用Loader=yaml.FullLoader参数来确保安全性。为了解决这个问题,你可以按照警告中提供的链接了解详情,并修改代码中的yaml加载部分:
yaml_cfg = edict(yaml.load(f, Loader=yaml.FullLoader))
这个错误表明在加载yaml配置文件时,某个键的值的类型与原始类型不匹配,具体是str和bool类型的不匹配。为了解决这个问题,你可以检查代码中加载配置文件的部分,并确保键的值的类型与原始类型匹配。
综上所述,你可以按照以下步骤来解决这些问题:
希望以上解决方案能够帮助你解决问题。如果你需要更详细的帮助,可以提供更多代码细节,这样我就可以更准确地帮助你解决问题。