捷徑

torcharrow.functional.get_max_count

torcharrow.functional.get_max_count(input_ids: ListColumn, matching_ids: ListColumn)

如果 input_ids 和 matching_ids 之間存在重疊的項目,則將重疊 ID 的最大實例數計入最大計數。

參數:
  • input_ids (第一個 ID 列表) –

  • matching_ids (第二個 ID 列表) –

範例

>>> import torcharrow as ta
>>> from torcharrow import functional
>>> input_ids = ta.column([[1, 1, 2, 3],[5,8],[13]])
>>> matching_ids = ta.column([[1,2,3],[2,3],[13,13,13,13,13]])
>>> functional.get_max_count(input_ids, matching_ids)
0  4
1  0
2  5
dtype: Float32(nullable=True), length: 3, null_count: 0

文件

存取 PyTorch 的完整開發者文件

檢視文件

教學

取得適用於初學者和進階開發人員的深入教學

檢視教學

資源

尋找開發資源並獲得問題解答

檢視資源