Skip to content
This repository was archived by the owner on Jun 22, 2022. It is now read-only.
This repository was archived by the owner on Jun 22, 2022. It is now read-only.

wrong cross entropy definition #3

Description

@kamil-kaczmarek

cross_entropy function: https://github.com/minerva-ml/steppy-toolkit/blob/master/steppy_toolkit/pytorch/validation.py#L24 probably should be defined in a slightly different way:

def cross_entropy(output, target, squeeze=False):
    if squeeze:
        target = target.squeeze(1)
    return F.nll_loss(F.log_softmax(output), target)

Please verify.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions