c04fe56d4c5d15554a9d9c7c2955851de6b37994,torch_geometric/nn/dense/diff_pool.py,DenseDiffPool,forward,#DenseDiffPool#Any#Any#,23
Before Change
x = x.unsqueeze(0) if x.dim() == 2 else x
adj = adj.unsqueeze(0) if adj.dim() == 2 else adj
s = s.unsqueeze(0) if s.dim() == 2 else s
batch_size = x.size(0)
out = torch.matmul(s.transpose(1, 2), x)
out_adj = torch.matmul(torch.matmul(s.transpose(1, 2), adj), s)
After Change
reg = adj - torch.matmul(s, s.transpose(1, 2))
reg = torch.norm(reg, p=2)
reg = reg / reg.numel()
return out, out_adj, reg
def __repr__(self):
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 3
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: c04fe56d4c5d15554a9d9c7c2955851de6b37994
Time: 2018-09-13
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/dense/diff_pool.py
Class Name: DenseDiffPool
Method Name: forward
Project Name: rusty1s/pytorch_geometric
Commit Name: 69dd0827d09eae0b4e6b95df854b2814175c9248
Time: 2019-04-10
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/models/autoencoder.py
Class Name: GAE
Method Name: negative_sampling
Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: gpytorch/utils/eig.py
Class Name:
Method Name: batch_symeig
Project Name: cornellius-gp/gpytorch
Commit Name: 4c6458b841bb49610b5cf6b9fbab94df5cad85ee
Time: 2019-01-23
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/interpolated_lazy_tensor.py
Class Name: InterpolatedLazyTensor
Method Name: _quad_form_derivative
Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/lazy_tensor.py
Class Name: LazyTensor
Method Name: matmul
Project Name: masa-su/pixyz
Commit Name: 669db4064682fd00363e50fa72572ea675789e85
Time: 2019-05-11
Author: masa@weblab.t.u-tokyo.ac.jp
File Name: pixyz/flows/operations.py
Class Name: Preprocess
Method Name: forward