def __init__(self, out_dim, hidden_dim, n_layers, processing_steps=3): super(MPNNReadout, self).__init__() with self.init_scope(): self.set2set = Set2Set(in_channels=hidden_dim, n_layers=n_layers) self.linear1 = links.Linear(None, hidden_dim) self.linear2 = links.Linear(None, out_dim) self.out_dim = out_dim self.hidden_dim = hidden_dim self.n_layers = n_layers self.processing_steps = processing_steps
def __init__(self, node_features = None, edge_features = None, target_features = 1, hidden_features = 73, num_layers = 3, s2s_processing_steps = 12, type="regression", dropout=0.5, **kwargs): super(MPNN_ENN_K_Set2Set, self).__init__() self.input = nn.Linear(in_features=node_features,out_features=hidden_features) self.ee = EdgeEncoderMLP( edge_features, hidden_features ) self.mpnn = MPNN_enn(edge_features, hidden_features) self.mpnn.set_T(num_layers) self.s2s = Set2Set(hidden_features, s2s_processing_steps, num_layers=1) self.output = nn.Linear(in_features=hidden_features,out_features=target_features) self.type = type self.output_function = get_output_function(type,target_features)
def __init__(self, node_features = None, edge_features = None, target_features = 1, hidden_features = 73, num_layers = 3, s2s_processing_steps = 12, type="regression", dropout=0.5, **kwargs): super(EdgeRES1_K_Set2Set, self).__init__() self.mlpin = TransitionMLP( node_features, hidden_features ) self.gcmid = RESKnorm( hidden_features, hidden_features, hidden_features, nlayers = num_layers, residue_layers=1 ) self.mlpout = TransitionMLP( hidden_features, target_features ) self.ee = EdgeEncoderMLP( edge_features, hidden_features ) self.s2s = Set2Set(hidden_features, s2s_processing_steps, num_layers=1) self.type = type self.output_function = get_output_function(type,target_features)
def __init__(self, node_features = None, edge_features = None, target_features = 1, hidden_features = 73, num_layers = 3, s2s_processing_steps = 12, type="regression", dropout=0.5, **kwargs): super(EdgeGCN_K_Set2Set, self).__init__() self.mlpin = TransitionMLP( node_features, hidden_features ) self.gcmid = nn.ModuleList( [ EdgeGraphConvolution( hidden_features, hidden_features ) for _ in range(num_layers) ] ) self.mlpout = TransitionMLP( hidden_features, target_features ) self.dropout = dropout self.ee = EdgeEncoderMLP( edge_features, hidden_features ) self.s2s = Set2Set(hidden_features, s2s_processing_steps, num_layers=1) self.type = type self.output_function = get_output_function(type,target_features)
def __init__(self, input_dim, hidden_dim, embedding_dim, label_dim, num_layers, pred_hidden_dims=[], concat=True, bn=True, dropout=0.0, args=None): super(GcnSet2SetEncoder, self).__init__(input_dim, hidden_dim, embedding_dim, label_dim, num_layers, pred_hidden_dims, concat, bn, dropout, args=args) self.s2s = Set2Set(self.pred_input_dim, self.pred_input_dim * 2)