Skip to content

Questions about using DGLLife with DGL #227

Description

@code4luck

Thank you for your ongoing support. I have a question regarding an issue I'm facing when using the GINConv model from DGL with data features for small molecules processed by DGLLife. I use
`
class ESIDataset(data.Dataset):
def init(self, list_IDs, df):
self.list_IDs = list_IDs
self.df = df
self.atom_featurizer = CanonicalAtomFeaturizer()
self.bond_featurizer = CanonicalBondFeaturizer(self_loop=True)
self.fc = partial(smiles_to_bigraph, add_self_loop=True)

def __len__(self):
    return len(self.list_IDs)

def __getitem__(self, index):
    index = self.list_IDs[index]
    v_d = self.df.iloc[index]['SMILES']
    v_d = self.fc(smiles=v_d, node_featurizer=self.atom_featurizer, edge_featurizer=self.bond_featurizer) 
    return v_d

for the SMEILS datasets. While I use from dgl.nn.pytorch import GINConv to make a model, I'm wondering if this approach to building the model is compatible with the data features in DGLLife. node_feats = batch_graph.ndata.pop('h') node_feats = gin(batch_graph, node_feats) ,Thanks!

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions