評價此頁

torch.Tensor.map_#

Tensor.map_(tensor, callable)#

callable 應用於 self 張量中的每個元素以及給定的 tensor,並將結果儲存在 self 張量中。 self 張量和給定的 tensor 必須是 可廣播的

callable 應該具有以下簽名:

def callable(a, b) -> number