这个年纪就是要多吃多睡! 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日

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?