tensorflow / tensorflow/java

automatically generate op convenience overloads?

未關閉
#246 11 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 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})));

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 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

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。