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

gnn_citations.(py|md|ipynb) GRU code path does not work #1766

Merged
merged 5 commits into from
Feb 19, 2024

Conversation

maxwbuckley
Copy link
Contributor

There is an optional GRU code path in the gnn_citations.(py|md|ipynb). However it doesn't currently work.

The combination_type "gated" should be "gru"

If you set the combination_type to "gated" you get back a ValueError:

"Invalid combination type: gated" from the aggregate method call

Fixing that issue exposes another issue in that "layers.GRU" units must be an integer and not a list as it currently is hidden_units

To resolve this I made a method to match the signature of the create_ffn and add multiple GRU layers

However it complicates the example a bit...

Also the use of hidden units like this doesn't work if the hidden_layer sizes are different.

If you are happy with this change I will also update the ipynb and md files.

Fixing some related issues.

The combination_type "gated" should be "gru"

If you set the combination_type to "gated" you get back a ValueError:

"Invalid combination type: gated"  from the aggregate method call

Fixing that issue exposes another issue in that "layers.GRU" units must be an integer and not a list as it currently is hidden_units

To resolve this I made a method to match the signature of the create_ffn and add multiple GRU layers

However it complicates the example a bit...

Also the use of hidden units like this doesn't work if  the hidden_layer sizes are different.

If you are happy with this change I can also update the ipynb and md files.
Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! The code looks good -- please add the md and ipynb files.

@fchollet fchollet merged commit ef68c0f into keras-team:master Feb 19, 2024
1 of 3 checks passed
sitamgithub-MSIT pushed a commit to sitamgithub-MSIT/keras-io that referenced this pull request May 30, 2024
)

* Update gnn_citations.py

Fixing some related issues.

The combination_type "gated" should be "gru"

If you set the combination_type to "gated" you get back a ValueError:

"Invalid combination type: gated"  from the aggregate method call

Fixing that issue exposes another issue in that "layers.GRU" units must be an integer and not a list as it currently is hidden_units

To resolve this I made a method to match the signature of the create_ffn and add multiple GRU layers

However it complicates the example a bit...

Also the use of hidden units like this doesn't work if  the hidden_layer sizes are different.

If you are happy with this change I can also update the ipynb and md files.

* Streamlining the code

* Update the md and ipynb files

* Removed accidental ipynb edits

* Format with black to fix presubmit issue.
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

Successfully merging this pull request may close these issues.

3 participants