Reconsider Loss generic parameter
未关闭
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 928
- 派生
- 227
- PR 合并指标
- 30 天内没有已合并 PR
描述
I brought this up with @JimClarke5 but wanted to get some wider comments on it.
The generic parameter for Losses doesn't seem right:
<T extends TNumber> Operand<T> call(Ops tf, Operand<? extends TNumber> labels, Operand<T> predictions, Operand<T> sampleWeights);
It binds the loss value, the predictions, and the weights to the same data type. There is no relation there: it's easy enough to imagine float-weighted cosine similarity of one hot vector predictions, which would return a float. The only necessary data type parameter I can think of is the return type, and that should be on the class.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 issue 中显示的 Loss 泛型方法签名开始,检查周围的 Loss API 及其调用方。查看现有的评论讨论,确认对类型关系的共识。泛型设计确定,并且受影响的 API 和调用方一致反映该决定,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, tensorflow
- 领域
- backend-api-design, machine-learning
- Issue 类型
- 重构
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100