Skip to content

No need to softmax() for nn.CrossEntropyLoss() #1

@whubaichuan

Description

@whubaichuan

hi, in Tutorial_PEPITA_FullyConnectedNets_CIFAR-10.ipynb, I notice that you do the softmax() for the network's output and then use this output to nn.CrossEntropyLoss(). However, nn.CrossEntropyLoss() is equivalent to the combination of LogSoftmax and NLLLoss, which means nn.CrossEntropyLoss() will do the softmax() again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions