class_docstr: One can also write a prediction function that predicts a vector for each edge with an MLP.
  Such vector can be used in further downstream tasks, e.g. as logits of a categorical distribution.
class_docstr_tok: ["One","can","also","write","a","prediction","function","that","predicts","a","vector","for","each","edge","with","an","MLP",".","Such","vector","can","be","used","in","further","downstream","tasks",",","e.g",".","as","logits","of","a","categorical","distribution","."]
code: def apply_edges(self, edges):
      import torch
  
      h_u = edges.src["h"]
      h_v = edges.dst["h"]
      score = self.W(torch.cat([h_u, h_v], 1))
      return {"score": score}
  
imports: from typing import TYPE_CHECKING, Any
  from .None import constants
  import logging
label_desc: Use image node_id 2 for calling the MLPPredictor obj's underlying member method code with example usage: obj.apply_edges(edges) and returns: dict