src/proteingnn/example/model.py
def _get_layer(self, conv_name, in_channels, hidden_channels, gnorm_name, leakyrelu_slope, **kwargs):
        """Utility function to generate graph layer."""
        layer = [
            (getattr(gnn, conv_name)(in_channels, hidden_channels, **kwargs), 'x, edge_index -> x'),
            nn.LeakyReLU(leakyrelu_slope),
        ]
        if gnorm_name:
            layer.append(getattr(gnn, gnorm_name))

        return gnn.Sequential('x, edge_index, batch', layer)
Utility function to generate graph layer.
Utility function to generate graph layer.
Utility function to generate graph layer .
def _get_layer(self, conv_name, in_channels, hidden_channels, gnorm_name, leakyrelu_slope, **kwargs):
        layer = [
            (getattr(gnn, conv_name)(in_channels, hidden_channels, **kwargs), 'x, edge_index -> x'),
            nn.LeakyReLU(leakyrelu_slope),
        ]
        if gnorm_name:
            layer.append(getattr(gnn, gnorm_name))
        return gnn.Sequential('x, edge_index, batch', layer)
def _get_layer ( self , conv_name , in_channels , hidden_channels , gnorm_name , leakyrelu_slope , ** kwargs ) : layer = [ ( getattr ( gnn , conv_name ) ( in_channels , hidden_channels , ** kwargs ) , 'x, edge_index -> x' ) , nn . LeakyReLU ( leakyrelu_slope ) , ] if gnorm_name : layer . append ( getattr ( gnn , gnorm_name ) ) return gnn . Sequential ( 'x, edge_index, batch' , layer )
Utility function to generate graph layer.
Utility function to generate graph layer .
"""Utility function to generate graph layer."""
self
conv_name
in_channels
hidden_channels
gnorm_name
leakyrelu_slope