Skip to content

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

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 12月 08, 2016 by saxon_zh@saxon_zhGuest

Questions regarding "rank_cost"

Created by: CrossLee1

I use the provided rank_cost loss function for my training, with trainer_count = 4. In the end of each pass, the log will print the info of pos/neg.

At the end of Pass-00000, the log info is as follows: 13:14:26.505049 9642 CostLayer.cpp:283] calc pos/neg: 1.71909 pos= 4088 neg= 2378 13:14:26.505116 9642 CostLayer.cpp:283] calc pos/neg: 1.82728 pos= 4179 neg= 2287 13:14:26.505129 9642 CostLayer.cpp:283] calc pos/neg: 1.80886 pos= 4164 neg= 2302 13:14:26.505141 9642 CostLayer.cpp:283] calc pos/neg: 1.81664 pos= 4171 neg= 2296 13:14:26.505161 9642 TrainerInternal.cpp:179] Pass=0 Batch=203 samples=25865 AvgCost=0.629527 Eval: 13:14:27.374795 9642 Tester.cpp:111] Test samples=1450 cost=0.459305 Eval: 13:14:27.374897 9642 GradientMachine.cpp:112] Saving parameters to ./models/pass-00000

The sum of the number of samples in each trainer (4088+2378+4179+2287+4164+2302+4171+2296) is just equal to the number of training samples (25856), which is correct.

However, at the end of Pass-00001, the log is: 13:14:42.750605 9642 CostLayer.cpp:283] calc pos/neg: 2.94454 pos= 5097 neg= 1731 13:14:42.750634 9642 CostLayer.cpp:283] calc pos/neg: 3.07215 pos= 5152 neg= 1677 13:14:42.750646 9642 CostLayer.cpp:283] calc pos/neg: 3.32152 pos= 5248 neg= 1580 13:14:42.750658 9642 CostLayer.cpp:283] calc pos/neg: 3.20567 pos= 5206 neg= 1624 13:14:42.750675 9642 TrainerInternal.cpp:179] Pass=1 Batch=203 samples=25865 AvgCost=0.525822 Eval: 13:14:43.613981 9642 Tester.cpp:111] Test samples=1450 cost=0.404172 Eval: 13:14:43.614042 9642 GradientMachine.cpp:112] Saving parameters to ./models/pass-00001

The sum of the number of samples in each trainer (5097+1731+5152+1677+5248+1580+5206+1624) does not equal to 25865, but is 27315, the sum of training samples and testing samples (25865+1450).

Also in the subsequent pass, this sum number is always 27315, rather than 25865. It seems to count the pos/neg ratio using the training samples and test samples together, which is not appropriate in my opinion.

Then how could I get the pos/neg ratio of training and testing samples separately? Thanks~

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/Paddle#772
渝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