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

Add GCN and FiLM jit example #6692

Merged
merged 8 commits into from
Feb 14, 2023
Merged

Conversation

ftxj
Copy link
Contributor

@ftxj ftxj commented Feb 14, 2023

This PR wants to make example/film.py and example/gcn.py jittable. In the original implementation, if we just add .jittable() modify and call the torch.jit.script(model) function, we will get some errors. In example/gcn.py, the error msg is Expected a proper Tensor but got None, and in example/film.py, we will get a runtime error: object has no attribute or method '__call__'.

So, we use some small modifications to make these examples really jittable. In the example/film.py, since TorchScript doesn't support the index loop of ModuleList, we split the the last conv layer. In the example/gcn.py, we add a type hint for edge_weight variable. And we kept everything else the same.

@rusty1s rusty1s changed the title Add gcn and film jit example Add GCN and FiLM jit example Feb 14, 2023
@rusty1s rusty1s enabled auto-merge (squash) February 14, 2023 13:43
@rusty1s rusty1s merged commit 1530432 into pyg-team:master Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants