Ejemplo n.º 1
0
 def layer(layer_type, inputs, dim, training, args, **kwargs):
     """A wrapper to dispatch different layer construction
     """
     if layer_type.lower() == 'gcn':
         return aml_layers.graph_conv(inputs, dim, training, **kwargs)
     elif layer_type.lower() == 'gat':
         return aml_layers.graph_attention(inputs,
                                           dim,
                                           training,
                                           eps=1e-10,
                                           adaptive=args.adaptive,
                                           **kwargs)
     else:
         raise ValueError('layer type:', layer_type, ' not supported.')
Ejemplo n.º 2
0
def layer(layer_type, inputs, dim, training, args, **kwargs):
    """A wrapper to dispatch different layer construction
    """
    if layer_type.lower() == 'gcn':
        return aml_layers.graph_conv(inputs, dim, training, **kwargs)
    elif layer_type.lower() == 'gat':
        return aml_layers.graph_attention(
            inputs,
            dim,
            training,
            eps=1e-10,
            # we have a bug in the code for 'dsm' and 'sym' of gat
            #edge_normalize=args.edge_norm,
            adaptive=args.adaptive,
            **kwargs)
    else:
        raise ValueError('layer type:', layer_type, ' not supported.')