完整报错长这样:

C:/Users/pc-01/AppData/Local/Programs/Python/Python37/lib/site-packages/torch/include\torch/csrc/jit/ir/ir.h(1347): error: member "torch::jit::ProfileOptionalOp::Kind" may not be initialized

那么就找到这个ir.h对应的地方:

struct TORCH_API ProfileOptionalOp : public Node {static constexpr Symbol Kind = ::c10::prim::profile_optional;// 后面的省略...
};

有种解释是constexpr的问题,可以把constexpr改成const,但是试了没有用;

那干脆直接把这行注释掉(参考中github的方法),毕竟报错是“可能没有初始化”…至少是暂时能运行了

struct TORCH_API ProfileOptionalOp : public Node {// static constexpr Symbol Kind = ::c10::prim::profile_optional;// 后面的省略...
};

参考

https://github.com/facebookresearch/detectron2/issues/9

error: member “torch::jit::ProfileOptionalOp::Kind“ may not be initialized相关推荐

  1. pyinstaller 打包 torch\_jit_internal.py:750: UserWarning: Unable to retrieve source for @torch.jit._ov

    运行的时候不报错,但是打包以后,由于调用了pytorch,所以报了如下错误 torch\_jit_internal.py:750: UserWarning: Unable to retrieve so ...

  2. 2020-10-26runtime error: member access within null pointer of type ‘struct ListNode‘ (solution.cpp)错

    runtime error: member access within null pointer of type 'struct ListNode' (solution.cpp)错误 /*** Def ...

  3. .pth is a zip archive (did you mean to use torch.jit.load()?)

    RuntimeError: bert.pth is a zip archive (did you mean to use torch.jit.load()?) .pth is a zip archiv ...

  4. module 'torch.jit' has no attribute 'unused'

    module 'torch.jit' has no attribute 'unused' 解决方法:安装新版torch: pip install torch===1.4.0 torchvision== ...

  5. “load”: 不是“torch::jit”的成员

    严重性    代码    说明    项目    文件    行    禁止显示状态 错误    C2039    "load": 不是"torch::jit" ...

  6. 导入torchvision出现:AttributeError: module ‘torch.jit‘ has no attribute ‘unused‘错误

    导入torchvision出现:AttributeError: module 'torch.jit' has no attribute 'unused'错误 文章目录: 1 问题原因 2 解决方法 我 ...

  7. 成功解决torch\cuda\__init__.py“, line 208, in check_error raise Cuda Error(res) torch.cuda.Cuda Error: C

    成功解决torch\cuda\__init__.py", line 208, in check_error raise Cuda Error(res) torch.cuda.Cuda Err ...

  8. PyTorch:将模型转换为torch.jit.ScriptModule

    参见上一篇 C++调用PyTorch模型 import torch import torchvision# An instance of your model. model = torchvision ...

  9. 解决pytorch多进程ValueError: Error initializing torch.distributed using env:// rendezvou...报错

    完整报错为:ValueError: Error initializing torch.distributed using env:// rendezvous: environment variable ...

最新文章

  1. 原创 | 浅议个人数据开发利用新范式
  2. 金额转换,阿拉伯数字的金额转换成 面试编程题
  3. 职校电子计算机专业高考分数线,2015年重庆高考分数线公布:一本文572理573
  4. 华为笔记本matebook13_为什么我不推荐华为Matebook 13给职场新人/小白?
  5. git 服务器搭建,在自己服务器上搭建私有仓库
  6. 优化SQL Server的内存占用之执行缓存
  7. JS收集:遍历CHECKBOX
  8. flutter向上动画弹出菜单效果
  9. 策略设计模式_设计模式之 策略模式
  10. 资源组 —— 助你轻松解决单账户内的资源分组管理难题
  11. usleep头文件_Linunx的sleep,usleep,select,nonasleep对比与应用
  12. 人生轨迹的改变,首要在于思维方式的改变。--转贴 CSDN.NET公司内部论坛:迈向成功的“脑力操”...
  13. JAVA程序将PDF转化为TXT
  14. FastReport.Net使用:[18]形状(Shape)控件用法
  15. NS3000 电子海图长江导航应用分析
  16. win10控制面板快捷打开方式
  17. 改造 Firefox 浏览器——GitHub 热点速览 v.21.23
  18. UE4HTTP下载网速过慢问题
  19. 聊聊强AI——来到治愈系空间的小茶末
  20. Sentry开启 Github sso 配置(self-hosted)

热门文章

  1. 三元组法矩阵加法java_C语言实现矩阵加法、减法、乘法和数乘运算
  2. javascript 中文帮助文档_我的《ANSA快速入门指南》中文帮助文档浅析(上)
  3. git安装 perl ubuntu_Ubuntu系统上安装Git
  4. oracle rac单节点恢复,如何Oracle_RAC恢复一个节点总结
  5. 中间滑动 头部底部固定_固定抗震成品支座功能特点及作用
  6. 最短Hamilton路径(位运算基本思路)
  7. Codeforces Round #728 (Div. 2)
  8. ~~高精度除以低精度
  9. 目标检测——模型加速的学习笔记
  10. 深度学习之Image captioning的评分指标篇(BLEU、CIDEr)