WHCSRL 技术网

AttributeError ‘NoneType‘ object has no attribute ‘get_function‘解决方案_zhangyu

AttributeError: ‘NoneType’ object has no attribute 'get_function’解决方案

错误

在运行unflownet时报错

return cupy.cuda.compile_with_cache(strKernel).get_function(strFunction)
  • 1

AttributeError: ‘NoneType’ object has no attribute ‘get_function’

解决方案

AttributeError: ‘NoneType’ object has no attribute 'get_function’解决方案

cupy v10之后不再使用compile_with_cache,

cupy.RawKernel替换cupy.cuda.compile_with_cache

改为:

return cupy.RawKernel(strKernel,strFunction)
  • 1
文章知识点与官方知识档案匹配,可进一步学习相关知识
Python技能树人工智能深度学习30365 人正在系统学习中
推荐阅读