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

Functional.of silently skips layers without inbound layers. #314

Closed
juliabeliaeva opened this issue Dec 19, 2021 · 1 comment · Fixed by #333
Closed

Functional.of silently skips layers without inbound layers. #314

juliabeliaeva opened this issue Dec 19, 2021 · 1 comment · Fixed by #333
Labels
bug Something isn't working
Milestone

Comments

@juliabeliaeva
Copy link
Contributor

Consider the following code:

    val model = Functional.of(
        Input(128, 128, name = "input"),
        Conv2D(name = "conv")
    )
    println(model.layers.size)

This code outputs "1" and the created model has a single input layer, however this was probably not the authors intention. The problem is with the Functional.Companion#topologicalSort method which does not support disconnected graphs and just silently skips layers which are not reachable from the input. Instead an exception should be thrown, or at least an error printed in this case.

@smallshen smallshen mentioned this issue Dec 20, 2021
@zaleslaw
Copy link
Collaborator

Thank you for this issue, agree about the warning or better with exception here

@zaleslaw zaleslaw added the good first issue Good for newcomers label Dec 20, 2021
@zaleslaw zaleslaw added this to the 0.4 milestone Dec 20, 2021
@zaleslaw zaleslaw added bug Something isn't working and removed good first issue Good for newcomers labels Feb 1, 2022
@zaleslaw zaleslaw assigned zaleslaw and unassigned zaleslaw Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants