in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/mxnet.py [0:0]
def forward(self, g, features):
# get embeddings for all node types. for target node type, use passed in target features
h_dict = {'target': features}
for ntype in self.embed_dict:
if g[0].number_of_nodes(ntype) > 0:
h_dict[ntype] = self.embed_dict[ntype](nd.array(g[0].nodes(ntype), self.ctx))
# pass through all layers
for i, layer in enumerate(self.layers[:-1]):
if i != 0:
h_dict = {k: nd.LeakyReLU(h) for k, h in h_dict.items()}
h_dict = layer(g[i], h_dict)
# get target logits
# return h_dict['target']
return self.layers[-1](h_dict['target'])