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