Bonjour, j'ai la même erreur :
TypeError Traceback (most recent call last)
Cell In[22], line 22
19 for epoch in range(1,num_epochs+1):
21 print(f"Train epoch {epoch:03d}")
---> 22 train_acc = train(device, atom_embedding_dim=atom_embedding, criterion=criterion, evaluator=evaluator)[acc_crit]
23 learning_curves["train"].append(train_acc)
25 print(f"Validation epoch{epoch:03d}")
Cell In[19], line 46
44 data = data.to(device)
45 # Perform the forward pass
---> 46 out = model(data)
47 # Compute the accuracy
48 y.append(data.y.view(out.shape).detach().cpu())
File c:\Python310\lib\site-packages\torch\nn\modules\module.py:1511, in Module._wrapped_call_impl(self, *args, **kwargs)
1509 return self._compiled_call_impl(*args, **kwargs) # type: ignore[misc]
1510 else:
-> 1511 return self._call_impl(*args, **kwargs)
File c:\Python310\lib\site-packages\torch\nn\modules\module.py:1520, in Module._call_impl(self, *args, **kwargs)
1515 # If we don't have any hooks, we want to skip the rest of the logic in
1516 # this function, and just call forward.
1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks
1518 or _global_backward_pre_hooks or _global_backward_hooks
1519 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1520 return forward_call(*args, **kwargs)
1522 try:
1523 result = None
Cell In[18], line 91
89 h = self.atom_encoder(x)
90 for layer in range(self.num_layers-1):
---> 91 h = self.convs[layer](h, edge_index, edge_attr)
92 h = self.batch_norms[layer](h)
93 h = F.relu(h)
File c:\Python310\lib\site-packages\torch\nn\modules\module.py:1511, in Module._wrapped_call_impl(self, *args, **kwargs)
1509 return self._compiled_call_impl(*args, **kwargs) # type: ignore[misc]
1510 else:
-> 1511 return self._call_impl(*args, **kwargs)
File c:\Python310\lib\site-packages\torch\nn\modules\module.py:1520, in Module._call_impl(self, *args, **kwargs)
1515 # If we don't have any hooks, we want to skip the rest of the logic in
1516 # this function, and just call forward.
1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks
1518 or _global_backward_pre_hooks or _global_backward_hooks
1519 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1520 return forward_call(*args, **kwargs)
1522 try:
1523 result = None
Cell In[18], line 41
39 deg_inv_sqrt[deg_inv_sqrt == float('inf')] = 0
40 norm = deg_inv_sqrt[row] * deg_inv_sqrt[col]
---> 41 return self.propagate(edge_index, x=x, edge_attr=edge_embedding, norm=norm) + F.relu(x + self.root_emb.weight)*1.0/deg.view(-1,1)
TypeError: propagate() got an unexpected keyword argument 'x'
merci Cordialement.