(self, pos_h, neg_h, summary)
| 187 | return torch.sigmoid(value) |
| 188 | |
| 189 | def get_loss(self, pos_h, neg_h, summary): |
| 190 | |
| 191 | pos_loss = -torch.log(self.discriminate(pos_h, summary) + self.EPS).mean() |
| 192 | neg_loss = -torch.log(1 - self.discriminate(neg_h, summary) + self.EPS).mean() |
| 193 | |
| 194 | return pos_loss + neg_loss |
| 195 | |
| 196 | |
| 197 | # def predict(self, x, edge_index, edge_weigt=None, batch=None): |
nothing calls this directly
no test coverage detected