tf2_gnn/layers/message_passing/message_passing.py
def _message_function(
        self,
        edge_source_states: tf.Tensor,
        edge_target_states: tf.Tensor,
        num_incoming_to_node_per_message: tf.Tensor,
        edge_type_idx: int,
        training: bool,
    ) -> tf.Tensor:
        """Abstract method to calculate the messages passed from a source nodes to target nodes.

        NOTE: This function should calculate messages for a single edge type.

        Args:
            edge_source_states: A tensor of shape [E, D] giving the node states at the source node
                of each edge.
            edge_target_states: A tensor of shape [E, D] giving the node states at the target node
                of each edge.
            num_incoming_to_node_per_message: A tensor of shape [E] giving the number of messages
                entering the target node of each edge. For example, if
                num_incoming_to_node_per_message[i] = 4, then there are 4 messages whose target
                node is the target node of message i.
            edge_type_idx: The edge type that that these messages correspond to.

        Returns:
            If this layer is to be used with the `_compute_new_node_embeddings` function as defined
            in this class, this function should return a tensor of shape [E, H] representing the
            messages passed along each edge.
        """
        pass
Abstract method to calculate the messages passed from a source nodes to target nodes.

        NOTE: This function should calculate messages for a single edge type.

        Args:
            edge_source_states: A tensor of shape [E, D] giving the node states at the source node
                of each edge.
            edge_target_states: A tensor of shape [E, D] giving the node states at the target node
                of each edge.
            num_incoming_to_node_per_message: A tensor of shape [E] giving the number of messages
                entering the target node of each edge. For example, if
                num_incoming_to_node_per_message[i] = 4, then there are 4 messages whose target
                node is the target node of message i.
            edge_type_idx: The edge type that that these messages correspond to.

        Returns:
            If this layer is to be used with the `_compute_new_node_embeddings` function as defined
            in this class, this function should return a tensor of shape [E, H] representing the
            messages passed along each edge.
        
Abstract method to calculate the messages passed from a source nodes to target nodes.
NOTE: This function should calculate messages for a single edge type.
Abstract method to calculate the messages passed from a source nodes to target nodes . NOTE : This function should calculate messages for a single edge type .
def _message_function(
        self,
        edge_source_states: tf.Tensor,
        edge_target_states: tf.Tensor,
        num_incoming_to_node_per_message: tf.Tensor,
        edge_type_idx: int,
        training: bool,
    ) -> tf.Tensor:
        pass
def _message_function ( self , edge_source_states : tf . Tensor , edge_target_states : tf . Tensor , num_incoming_to_node_per_message : tf . Tensor , edge_type_idx : int , training : bool , ) -> tf . Tensor : pass
Abstract method to calculate the messages passed from a source nodes to target nodes.
Abstract method to calculate the messages passed from a source nodes to target nodes .
"""Abstract method to calculate the messages passed from a source nodes to target nodes.

        NOTE: This function should calculate messages for a single edge type.

        Args:
            edge_source_states: A tensor of shape [E, D] giving the node states at the source node
                of each edge.
            edge_target_states: A tensor of shape [E, D] giving the node states at the target node
                of each edge.
            num_incoming_to_node_per_message: A tensor of shape [E] giving the number of messages
                entering the target node of each edge. For example, if
                num_incoming_to_node_per_message[i] = 4, then there are 4 messages whose target
                node is the target node of message i.
            edge_type_idx: The edge type that that these messages correspond to.

        Returns:
            If this layer is to be used with the `_compute_new_node_embeddings` function as defined
            in this class, this function should return a tensor of shape [E, H] representing the
            messages passed along each edge.
        """
If this layer is to be used with the `_compute_new_node_embeddings` function as defined
in this class, this function should return a tensor of shape [E, H] representing the
messages passed along each edge.
If this layer is to be used with the ` _compute_new_node_embeddings ` function as defined in this class this function should return a tensor of shape [ E H ] representing the messages passed along each edge .
self
edge_source_states
tf.Tensor
A tensor of shape [E, D] giving the node states at the source node
of each edge.
A tensor of shape [ E D ] giving the node states at the source node of each edge .
edge_target_states
tf.Tensor
A tensor of shape [E, D] giving the node states at the target node
of each edge.
A tensor of shape [ E D ] giving the node states at the target node of each edge .
num_incoming_to_node_per_message
tf.Tensor
A tensor of shape [E] giving the number of messages
entering the target node of each edge. For example, if
num_incoming_to_node_per_message[i] = 4, then there are 4 messages whose target
node is the target node of message i.
A tensor of shape [ E ] giving the number of messages entering the target node of each edge . For example if num_incoming_to_node_per_message [ i ] = 4 then there are 4 messages whose target node is the target node of message i .
edge_type_idx
int
The edge type that that these messages correspond to.
The edge type that that these messages correspond to .
training
bool