789d65f38f0949a3f03f61908a207cb558746769,stellargraph/layer/preprocessing_layer.py,GraphPreProcessingLayer,call,#GraphPreProcessingLayer#Any#,48
Before Change
adj_T, tf.where(adj_T > adj, tf.ones_like(adj), tf.zeros_like(adj))
)
- tf.multiply(
adj, tf.where(adj_T > adj, tf.ones_like(adj), tf.zeros_like(adj))
)
)
// Add self loops.
adj = adj + tf.linalg.diag(tf.ones(adj.shape[0]) - tf.diag_part(adj))
// Normalization
rowsum = tf.reduce_sum(adj, 1)
d_mat_inv_sqrt = tf.diag(tf.rsqrt(rowsum))
adj_normalized = tf.matmul(tf.matmul(d_mat_inv_sqrt, adj), d_mat_inv_sqrt)
return adj_normalized
After Change
// Normalization
rowsum = tf.reduce_sum(adj, 1)
d_mat_inv_sqrt = tf.linalg.diag(tf.math.rsqrt(rowsum))
adj_normalized = tf.matmul(tf.matmul(d_mat_inv_sqrt, adj), d_mat_inv_sqrt)
return adj_normalized
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: stellargraph/stellargraph
Commit Name: 789d65f38f0949a3f03f61908a207cb558746769
Time: 2019-12-19
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/layer/preprocessing_layer.py
Class Name: GraphPreProcessingLayer
Method Name: call
Project Name: geomstats/geomstats
Commit Name: dc39188e6611f254dfb9ef0358570efe59704ff5
Time: 2018-05-03
Author: ninamio78@gmail.com
File Name: geomstats/spd_matrices_space.py
Class Name: SPDMatricesSpace
Method Name: sqrtm
Project Name: scipy/scipy
Commit Name: 41a383ea63d10b58974756bba8101ea6a65284e0
Time: 2013-06-20
Author: argriffi@ncsu.edu
File Name: scipy/linalg/_matfuncs_sqrtm.py
Class Name:
Method Name: _sqrtm_triu