这个年纪就是要多吃多睡! 2022-03-04 15:57 采纳率: 50%
浏览 149
已结题

RuntimeError: where in ParamScheduler must be in [0, 1]: got 5.0 怎么解决啊?

问题遇到的现象和发生背景

我做实例分割训练自己的数据集,训练次数MAX_ITER: 200会出现错误,要把次数提到上千次才行,但是gpu这个时候就受不了了,这是什么原因?要怎么修改?

问题相关代码,请勿粘贴截图
运行结果及报错内容
Traceback (most recent call last):
  File "tools/train_net.py", line 226, in <module>
    launch(
  File "f:\cocoapi\detectron2-0.4\detectron2\engine\launch.py", line 62, in launch
    main_func(*args)
  File "tools/train_net.py", line 214, in main
    trainer = Trainer(cfg)
  File "f:\cocoapi\detectron2-0.4\detectron2\engine\defaults.py", line 323, in __init__
    self.scheduler = self.build_lr_scheduler(cfg, optimizer)
  File "f:\cocoapi\detectron2-0.4\detectron2\engine\defaults.py", line 474, in build_lr_scheduler
    return build_lr_scheduler(cfg, optimizer)
  File "f:\cocoapi\detectron2-0.4\detectron2\solver\build.py", line 246, in build_lr_scheduler
    sched = WarmupParamScheduler(
  File "f:\cocoapi\detectron2-0.4\detectron2\solver\lr_scheduler.py", line 37, in __init__
    end_value = scheduler(warmup_length)  # the value to reach when warmup ends
  File "E:\Anaconda\envs\detectron2\lib\site-packages\fvcore\common\param_scheduler.py", line 236, in __call__
    raise RuntimeError(
RuntimeError: where in ParamScheduler must be in [0, 1]: got 5.0

我的解答思路和尝试过的方法
我想要达到的结果
  • 写回答

1条回答 默认 最新

  • ty94666 2022-03-04 16:05
    关注

    where in ParamScheduler must be in [0, 1]: got 5.0

    需要0到1的数据,你传的是5.0
    数据需要过一个softmax函数,归一化

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 5月28日
  • 已采纳回答 5月20日
  • 创建了问题 3月4日

悬赏问题

  • ¥170 如图所示配置eNSP
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥15 键盘指令混乱情况下的启动盘系统重装