torch_npu.npu_softmax_cross_entropy_with_logits
API接口
torch_npu.npu_softmax_cross_entropy_with_logits(features, labels) -> Tensor
功能描述
计算softmax的交叉熵cost。
参数说明
features (Tensor) - 张量,一个“batch_size * num_classes”矩阵。
labels (Tensor) - 与“features”同类型的张量。一个“batch_size * num_classes”矩阵。
父主题:
torch_npu