automatically generate op convenience overloads?
未关闭
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 928
- 派生
- 227
- PR 合并指标
- 30 天内没有已合并 PR
描述
Should we extend the code generation for ops to automatically generate convenience overloads? This would help reduce the gap between Python notation and Java notation.
As an example of where we stand now, here's some Python code (keras/metrics.py, around line 2203):
dp = p[:self.num_thresholds - 1] - p[1:]
And here's the corresponding Java code (AUC.java, around line 809):
Operand<T> dP =
tf.math.sub(
tf.slice(
p, tf.constant(new int[] {0}), tf.constant(new int[] {getNumThresholds() - 1})),
tf.slice(p, tf.constant(new int[] {1}), tf.constant(new int[] {-1})));
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先比较 keras/metrics.py 中约第 2203 行的 Python 示例与 AUC.java 中约第 809 行的 Java 实现。确定应生成哪些 convenience overloads,以及 Python 和 Java 形式应如何对应;确定一致的生成范围和由此产生的 Java API 后,即可视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, tensorflow
- 领域
- api, tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100