Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • Paddle
  • Issue
  • #24580

P
Paddle
  • 项目概览

PaddlePaddle / Paddle
大约 2 年 前同步成功

通知 2325
Star 20933
Fork 5424
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 1423
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 543
  • Wiki 0
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 项目成员
  • Pages
P
Paddle
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 1,423
    • Issue 1,423
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 543
    • 合并请求 543
  • Pages
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 0
    • Wiki
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 提交
  • Issue看板
已关闭
开放中
Opened 5月 15, 2020 by saxon_zh@saxon_zhGuest

PaddlePaddle1.6.2下动态图使用warmup报错

Created by: ViktorAxelsen

  • 版本、环境信息:    1)PaddlePaddle版本:1.6.2    2)CPU:AI Studio    3)GPU:V100,AI Studio上的    4)系统环境:Python2.7
  • 训练信息    1)单卡    2)16GB / 32GB    3)linear_lr_warmup
  • 复现信息:环境就是AI Studio,代码为AI识虫比赛官方给的train.py代码
  • 问题描述:动态图下,训练时使用linear_lr_warmup报错: Traceback (most recent call last): File "train.py", line 58, in decayed_lr = fluid.layers.linear_lr_warmup(learning_rate, 850, 1e-6, 1e-3) File "/opt/conda/envs/python27-paddle120-env/lib/python2.7/site-packages/paddle/fluid/layers/learning_rate_scheduler.py", line 535, in linear_lr_warmup tensor.assign(decayed_lr, lr) File "/opt/conda/envs/python27-paddle120-env/lib/python2.7/site-packages/paddle/fluid/layers/control_flow.py", line 1595, in exit self.block.complete() File "/opt/conda/envs/python27-paddle120-env/lib/python2.7/site-packages/paddle/fluid/layers/control_flow.py", line 1680, in complete 'is_scalar_condition': self.is_scalar_condition File "/opt/conda/envs/python27-paddle120-env/lib/python2.7/site-packages/paddle/fluid/framework.py", line 2479, in append_op kwargs.get("stop_gradient", False)) File "/opt/conda/envs/python27-paddle120-env/lib/python2.7/site-packages/paddle/fluid/dygraph/tracer.py", line 47, in trace_op not stop_gradient) TypeError: trace(): incompatible function arguments. The following argument types are supported:
    1. (self: paddle.fluid.core_avx.Tracer, arg0: unicode, arg1: Dict[unicode, handle], arg2: Dict[unicode, handle], arg3: Dict[unicode, Variant], arg4: paddle::platform::CUDAPlace, arg5: bool) -> None
    2. (self: paddle.fluid.core_avx.Tracer, arg0: unicode, arg1: Dict[unicode, handle], arg2: Dict[unicode, handle], arg3: Dict[unicode, Variant], arg4: paddle::platform::CPUPlace, arg5: bool) -> None

Invoked with: <paddle.fluid.dygraph.tracer.Tracer object at 0x7f6cc2abaa70>, 'conditional_block', {'Input': [], 'Cond': [name tmp_2, dtype: VarType.FP32 shape: [1L] lod: {} dim: 1 layout: NCHW dtype: bool data: [1] ]}, {'Scope': [name _generated_var_0, shape: [0L], not inited], 'Out': []}, {'sub_block': idx: 1 parent_idx: 0 , 'is_scalar_condition': True}, <paddle.fluid.core_avx.CUDAPlace object at 0x7f6cc2b0d7d8>, True

部分代码: learning_rate = fluid.layers.piecewise_decay(boundaries=[13600, 20400], values=[1e-3, 1e-4, 1e-5]) decayed_lr = fluid.layers.linear_lr_warmup(learning_rate, 850, 1e-6, 1e-3) opt = fluid.optimizer.Adam(learning_rate=decayed_lr, regularization=fluid.regularizer.L2Decay(regularization_coeff=5e-4))

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/Paddle#24580
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7