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

Flatten input_type is not necessary #65

Open
matjobst opened this issue Oct 16, 2023 · 2 comments
Open

Flatten input_type is not necessary #65

matjobst opened this issue Oct 16, 2023 · 2 comments
Labels
after-paper Issues for after the initial paper submission

Comments

@matjobst
Copy link
Collaborator

The Flatten layer should not have a separate input_type field. It is not necessary. The input shape can be determined from the previous nodes. And every layer anyways has a input_type by inheritance.

@stevenabreu7 stevenabreu7 added the after-paper Issues for after the initial paper submission label Oct 18, 2023
@stevenabreu7
Copy link
Collaborator

I see your point, but it might also be useful to leave it to keep NIR explicit and expressive. Any other opinions?

(no rush on this, we can resolve this after the initial paper submission)

@matjobst
Copy link
Collaborator Author

As long as the graph has an Input with a given shape, the infer_shapes is able to determine the shapes, so I think the same goes as for any other layer, that we do not need to store the input_type.
I believe our consensus was that we do not store unnecessary information. But of course, the infer_shapes can and will determine the input_type of the Flatten layer. Therefore I do not think removing the field (I am only talking about the explicit field, not the one set by post_init) does not make NIR less expressive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
after-paper Issues for after the initial paper submission
Projects
None yet
Development

No branches or pull requests

2 participants