Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev branch: Obvious mistake in the code #311

Open
shleym2000 opened this issue Jul 7, 2024 · 1 comment
Open

dev branch: Obvious mistake in the code #311

shleym2000 opened this issue Jul 7, 2024 · 1 comment

Comments

@shleym2000
Copy link
Contributor

Two conditional statements always report false in bool NeuralNetwork::check_layer_type(const Layer::Type layer_type) code.

Now:

    {
        const Layer::Type first_layer_type = layers[0]->get_type();

        if(first_layer_type != Layer::Type::Scaling2D) return false;
        if(first_layer_type != Layer::Type::Scaling4D) return false;
    }

Should be

    {
        const Layer::Type first_layer_type = layers[0]->get_type();

        if ((first_layer_type != Layer::Type::Scaling2D) && (first_layer_type != Layer::Type::Scaling4D))
        {
            return false;
        }
    }
@shleym2000
Copy link
Contributor Author

shleym2000 commented Jul 11, 2024

Today this wrong code was changed into

        if(first_layer_type != Layer::Type::Scaling2D || first_layer_type != Layer::Type::Scaling4D) return false;

It still does not make sense, because absolutely any particular type would not match Scaling2D OR Scaling4D .

It should be AND ( && ) operation instead to have a special treatment for Scaling2D AND Scaling4D and different treatment for everything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant