torch.sparse.log_softmax¶ torch.sparse.log_softmax(input, dim, *, dtype=None) → Tensor¶ 应用 Softmax 函数后接对数运算。 更多详情请参见 softmax。 参数 input (Tensor) – 输入 dim (int) – 计算 softmax 的维度。 dtype (torch.dtype, 可选) – 返回张量的期望数据类型。如果指定,则在执行操作前将输入张量转换为 dtype 类型。这对于防止数据类型溢出很有用。默认值:None