捷徑

torcharrow.functional.get_score_max

torcharrow.functional.get_score_max(input_ids: ListColumn, matching_ids: ListColumn, matching_id_scores: ListColumn)

傳回 matching_id_scores 中所有在 matching_ids 中有對應 id,且該 id 也在 input_ids 中的所有 score 的最小值。

參數 :
  • input_ids (第一個 id 清單) –

  • matching_ids (第二個 id 清單) –

  • matching_ids_scores (matching_ids 的 score (權重) ) –

範例

>>> import torcharrow as ta
>>> from torcharrow import functional
>>> input_ids = ta.column([[1, 2, 3]])
>>> matching_ids = ta.column([[1,2]])
>>> matching_id_scores = ta.column([[5.0,4.0]])
>>> functional.get_score_min(input_ids, matching_ids, matching_id_scores)
0  5.0
dtype: Float32(nullable=True), length: 1, null_count: 0

文件

存取 PyTorch 的完整開發人員文件

檢視文件

教學課程

取得初學者和進階開發人員的深入教學課程

檢視教學課程

資源

尋找開發資源並獲得解答

檢視