tf2_gnn/layers/graph_global_exchange.py
def build(self, tensor_shapes: GraphGlobalExchangeInput):
        """Build the various layers in the model.

        Args:
            tensor_shapes: A GraphGlobalExchangeInput of tensor shapes.

        Returns:
            Nothing, but initialises the layers in the model based on the tensor shapes given.
        """
        self._node_to_graph_representation_layer = WeightedSumGraphRepresentation(
            graph_representation_size=self._hidden_dim,
            weighting_fun=self._weighting_fun,
            num_heads=self._num_heads,
            scoring_mlp_layers=[self._hidden_dim],
        )
        self._node_to_graph_representation_layer.build(
            NodesToGraphRepresentationInput(
                node_embeddings=tensor_shapes.node_embeddings,
                node_to_graph_map=tensor_shapes.node_to_graph_map,
                num_graphs=tensor_shapes.num_graphs,
            )
        )

        super().build(tensor_shapes)
Build the various layers in the model.

        Args:
            tensor_shapes: A GraphGlobalExchangeInput of tensor shapes.

        Returns:
            Nothing, but initialises the layers in the model based on the tensor shapes given.
        
Build the various layers in the model.
Build the various layers in the model .
def build(self, tensor_shapes: GraphGlobalExchangeInput):
        self._node_to_graph_representation_layer = WeightedSumGraphRepresentation(
            graph_representation_size=self._hidden_dim,
            weighting_fun=self._weighting_fun,
            num_heads=self._num_heads,
            scoring_mlp_layers=[self._hidden_dim],
        )
        self._node_to_graph_representation_layer.build(
            NodesToGraphRepresentationInput(
                node_embeddings=tensor_shapes.node_embeddings,
                node_to_graph_map=tensor_shapes.node_to_graph_map,
                num_graphs=tensor_shapes.num_graphs,
            )
        )
        super().build(tensor_shapes)
def build ( self , tensor_shapes : GraphGlobalExchangeInput ) : self . _node_to_graph_representation_layer = WeightedSumGraphRepresentation ( graph_representation_size = self . _hidden_dim , weighting_fun = self . _weighting_fun , num_heads = self . _num_heads , scoring_mlp_layers = [ self . _hidden_dim ] , ) self . _node_to_graph_representation_layer . build ( NodesToGraphRepresentationInput ( node_embeddings = tensor_shapes . node_embeddings , node_to_graph_map = tensor_shapes . node_to_graph_map , num_graphs = tensor_shapes . num_graphs , ) ) super ( ) . build ( tensor_shapes )
Build the various layers in the model.
Build the various layers in the model .
"""Build the various layers in the model.

        Args:
            tensor_shapes: A GraphGlobalExchangeInput of tensor shapes.

        Returns:
            Nothing, but initialises the layers in the model based on the tensor shapes given.
        """
Nothing, but initialises the layers in the model based on the tensor shapes given.
Nothing but initialises the layers in the model based on the tensor shapes given .
self
tensor_shapes
GraphGlobalExchangeInput
A GraphGlobalExchangeInput of tensor shapes.
A GraphGlobalExchangeInput of tensor shapes .