class_docstr: A representation with message passing with uses edge features obtained from relation representations.
  
  It (re-)uses a representation layer for relations to obtain edge features, which are then utilized
  by appropriate message passing layers, e.g., :class:`torch_geometric.nn.conv.GMMConv`, or
  :class:`torch_geometric.nn.conv.GATConv`. We further allow a (shared) transformation of edge features
  between layers.
  
  The following example creates a two-layer GAT on top of the base representations:
  
  
  .. code-block:: python
  
      from pykeen.datasets import get_dataset
  
      embedding_dim = 64
      dataset = get_dataset(dataset="nations")
      r = FeaturizedMessagePassingRepresentation(
          triples_factory=dataset.training,
          base_kwargs=dict(shape=embedding_dim),
          relation_representation_kwargs=dict(
              shape=embedding_dim,
          ),
          layers="gat",
          layers_kwargs=dict(
              in_channels=embedding_dim,
              out_channels=embedding_dim,
              edge_dim=embedding_dim,  # should match relation dim
          ),
      )
  
  ---
  name: Featurized Message Passing
docstr: Initialize the representation.
  
  :param triples_factory:
      the factory comprising the training triples used for message passing
  
  :param relation_representation:
      the base representations for relations, or a hint thereof
  :param relation_representation_kwargs:
      additional keyword-based parameters passed to the base representations upon instantiation
  
  :param relation_transformation:
      an optional transformation to apply to the relation representations after each message passing step.
      If None, do not modify the representations.
  
  :param kwargs:
      additional keyword-based parameters passed to
      :meth:`TypedMessagePassingRepresentation.__init__`, except the `triples_factory`
docstr_tok: ["Initialize","the","representation",".",":","param","triples_factory",":","the","factory","comprising","the","training","triples","used","for","message","passing",":","param","relation_representation",":","the","base","representations","for","relations",",","or","a","hint","thereof",":","param","relation_representation_kwargs",":","additional","keyword-based","parameters","passed","to","the","base","representations","upon","instantiation",":","param","relation_transformation",":","an","optional","transformation","to","apply","to","the","relation","representations","after","each","message","passing","step",".","If","None",",","do","not","modify","the","representations",".",":","param","kwargs",":","additional","keyword-based","parameters","passed","to",":","meth",":","`","TypedMessagePassingRepresentation.__init__","`",",","except","the","`","triples_factory","`"]
code: def __init__(
      self,
      triples_factory: CoreTriplesFactory,
      relation_representation: HintOrType[Representation] = None,
      relation_representation_kwargs: OptionalKwargs = None,
      relation_transformation: Optional[nn.Module] = None,
      **kwargs,
  ):
      """
      Initialize the representation.
  
      :param triples_factory:
          the factory comprising the training triples used for message passing
  
      :param relation_representation:
          the base representations for relations, or a hint thereof
      :param relation_representation_kwargs:
          additional keyword-based parameters passed to the base representations upon instantiation
  
      :param relation_transformation:
          an optional transformation to apply to the relation representations after each message passing step.
          If None, do not modify the representations.
  
      :param kwargs:
          additional keyword-based parameters passed to
          :meth:`TypedMessagePassingRepresentation.__init__`, except the `triples_factory`
      """
      super().__init__(triples_factory=triples_factory, **kwargs)
  
      # avoid cyclic import
      from . import representation_resolver
  
      self.relation_representation = representation_resolver.make(
          relation_representation,
          pos_kwargs=relation_representation_kwargs,
          max_id=triples_factory.num_relations,
      )
      self.relation_transformation = relation_transformation
  
imports: from abc import ABC, abstractmethod
  from typing import Collection, Literal, Optional, Sequence
  import torch
  from class_resolver import ClassResolver, HintOrType, OneOrManyHintOrType, OneOrManyOptionalKwargs, OptionalKwargs
  from class_resolver.contrib.torch import activation_resolver
  from docdata import parse_docdata
  from torch import nn
  from .representation import Representation
  from .utils import ShapeError
  from ..triples.triples_factory import CoreTriplesFactory
  from ..typing import OneOrSequence
  from ..utils import get_edge_index, upgrade_to_sequence
label_desc: Use image node_id 1 to create a new FeaturizedMessagePassingRepresentation object from inherited base classes: TypedMessagePassingRepresentation with example: obj = FeaturizedMessagePassingRepresentation(triples_factory, relation_representation, relation_representation_kwargs, relation_transformation)