def get_loss()

in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/model.py [0:0]


    def get_loss(self, embed, sources, sinks, labels):
        # sources and sinks is a list of edge data samples (positive and negative)
        score = self.calc_score(embed, sources, sinks)
        predict_loss = F.binary_cross_entropy_with_logits(score, labels)
        reg_loss = self.regularization_loss(embed)
        return predict_loss + self.reg_param * reg_loss