7c9123131cb9e353ee8f6e1245f41d77f85af713,deepchem/models/tensorgraph/layers.py,AtomicConvolution,create_tensor,#AtomicConvolution#Any#Any#,3812

Before Change


    D = self.distance_tensor(X, Nbrs, self.boxsize, B, N, M, d)
    R = self.distance_matrix(D)
    sym = []
    rsf_zeros = tf.zeros((B, N, M))
    for i, param in enumerate(self.radial_params):

      if tfe.in_eager_mode():
        if not self._built:

After Change


    if not self.atom_types:
      cond = tf.to_float(tf.not_equal(Nbrs_Z, 0.0))
      cond = tf.reshape(cond, R.shape)
      layer = tf.reduce_sum(cond * rsf, 3)
    else:
      sym = []
      for j in range(len(self.atom_types)):
        cond = tf.to_float(tf.equal(Nbrs_Z, self.atom_types[j]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: deepchem/deepchem
Commit Name: 7c9123131cb9e353ee8f6e1245f41d77f85af713
Time: 2018-08-22
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/layers.py
Class Name: AtomicConvolution
Method Name: create_tensor


Project Name: osmr/imgclsmob
Commit Name: 879ae4cfb89595955190493b5787e6f0bf727d1a
Time: 2020-10-19
Author: osemery@gmail.com
File Name: tensorflow2/tf2cv/models/common.py
Class Name: SABlock
Method Name: call


Project Name: GPflow/GPflow
Commit Name: 1d3e25c3ad4835ee298675f557e4c78bc8501c74
Time: 2017-03-06
Author: james.hensman@gmail.com
File Name: GPflow/ekernels.py
Class Name: RBF
Method Name: eKxz