Skip to content

[BUG] examples/mnist_common.h bool compare(..., ...) #3378

Description

@DearMisaki

Description

when I call function std::stable_sort() using this compare function, the program crashed.

Reproducible Code and/or Steps

BEFORE:
bool compare(const std::pair<float, int> l, const std::pair<float, int> r) {
return l.first >= r.first;
}
AFTER:
bool compare(const std::pair<float, int> l, const std::pair<float, int> r) {
return l.first > r.first;
}

>= ---> >

Checklist

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions