-
I tried implementing the following code but I am encountering the following error. Does anyone know how to solve this error? Is there a
import torch
from torch import nn
from torch_geometric.nn import GAT
from torch_geometric.data import Data
gnn = GAT(in_channels=256,
hidden_channels=256,
num_layers=4,
heads=4,
dropout=0.1,
concat=False,
v2=True,
edge_dim=10,
norm=nn.BatchNorm1d(256))
compiled_model = torch.jit.script(gnn)
torch.jit.save(compiled_model, 'compiled_model.pt') I also tried something simpler: import torch
from torch_geometric.nn import GCNConv
conv1 = GCNConv(16, 16).jittable()
print(torch.jit.script(conv1).graph) But this also seems to be presenting the same error:
This is the version of my packages:
|
Beta Was this translation helpful? Give feedback.
Answered by
rusty1s
May 7, 2023
Replies: 1 comment 5 replies
-
For TorchScript support, you currently need to have |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That is expected since the input types are not fully resolved yet (
GCNConv
can operate both onedge_index
andSparseTensor
). It is fixable by either:jittable
: