You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I want to realize convolution given below by using torch_geometric.nn.MessagePassing class:
Given current event $e = (v_i,v_j,t,r)$, where $v_i,v_j,t,r$ denotes the source nodes、target nodes、continuous timestamp and event type respectively.
I want to caculate this function: $\lambda(e) = \sum_{p\in \mathcal{N}_i,<t} \alpha(p,e)z(v_p,v_j)\kappa_i(t-t_p)$
Where $\alpha(.)$ is the evolved attention mechanism function,$z(.)$ is the node distance measure, and $\kappa_i(.)$ is the time decay function with a learnable personalized
parameter $\delta_i$ .
Now I am puzzled by two problems below:
1.Calling Information In Message Diffusion Process of Class MessagePassing()
The tutorial in the pyg documentation only gives out an resolution by rewriting the method MessagePassing.forward and MessagePassing.message, which only diffuses the message from node j to node i and calls information from node i and j like this:
I want to know how to diffuse message from node p to event e,so that I can call information from node i,j,neighborp of node i and event e at the same time. It is great if there is an example or else I can refer to.
2.Parameter $\delta_i$ In $\kappa_i(.)$
Due to the $\delta_i$ is taged with node i, I want to claim a parameter like this:
I want to know if using torch.empty is correctly claim a parameter taged with node i. Should I adopt other method?
Thanks for your attention to my question.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I want to realize convolution given below by using
torch_geometric.nn.MessagePassing
class:Now I am puzzled by two problems below:
1.Calling Information In Message Diffusion Process of Class MessagePassing()
The tutorial in the pyg documentation only gives out an resolution by rewriting the method
MessagePassing.forward
andMessagePassing.message
, which only diffuses the message from nodej
to nodei
and calls information from nodei
andj
like this:I want to know how to diffuse message from node
p
to evente
,so that I can call information from nodei
,j
,neighborp
of nodei
and evente
at the same time. It is great if there is an example or else I can refer to.2.Parameter$\delta_i$ In $\kappa_i(.)$
Due to the$\delta_i$ is taged with node
i
, I want to claim a parameter like this:I want to know if using
torch.empty
is correctly claim a parameter taged with nodei
. Should I adopt other method?Thanks for your attention to my question.
Beta Was this translation helpful? Give feedback.
All reactions