22e98420bbd9c5a082c894d2df02ae0dbd41846d,torch_geometric/nn/models/autoencoder.py,GAE,eval,#GAE#Any#Any#Any#,79
Before Change
adj = torch.sigmoid(adj.detach())
pos_pred = adj[edge_index[0], edge_index[1]]
neg_pred = adj[neg_edge_index[0], neg_edge_index[1]]
y = torch.cat([pos_y, neg_y], dim=0).cpu()
pred = torch.cat([pos_pred, neg_pred], dim=0).cpu()
After Change
y = torch.cat([pos_y, neg_y], dim=0)
pos_pred = self.decode_for_indices(z, pos_edge_index, sigmoid=True)
neg_pred = self.decode_for_indices(z, neg_edge_index, sigmoid=True)
pred = torch.cat([pos_pred, neg_pred], dim=0)
y, pred = y.detach().cpu().numpy(), pred.detach().cpu().numpy()
return roc_auc_score(y, pred), average_precision_score(y, pred)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: 22e98420bbd9c5a082c894d2df02ae0dbd41846d
Time: 2019-03-20
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/models/autoencoder.py
Class Name: GAE
Method Name: eval
Project Name: tyarkoni/pliers
Commit Name: 9f53f2e790fba4a4411224e6255748a45099083a
Time: 2021-01-05
Author: rbrrcc@gmail.com
File Name: pliers/extractors/text.py
Class Name: BertExtractor
Method Name: _postprocess
Project Name: HyperGAN/HyperGAN
Commit Name: 365c861ccac7588596907b0cff8ddf69cc7a966c
Time: 2020-07-27
Author: mikkel@255bits.com
File Name: hypergan/samplers/grid_sampler.py
Class Name: GridSampler
Method Name: _sample