Commit 1797c11f authored by ZHENQIN WU's avatar ZHENQIN WU
Browse files

yapfed

parent b631fd3a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -173,7 +173,8 @@ def atom_features(atom, bool_id_feat=False, explicit_H=False):
        ]) + [atom.GetIsAromatic()]
    # In case of explicit hydrogen(QM8, QM9), avoid calling `GetTotalNumHs`
    if not explicit_H:
      results = results + one_of_k_encoding_unk(atom.GetTotalNumHs(), [0, 1, 2, 3, 4])
      results = results + one_of_k_encoding_unk(atom.GetTotalNumHs(),
                                                [0, 1, 2, 3, 4])

    return np.array(results)

+2 −2
Original line number Diff line number Diff line
@@ -171,8 +171,8 @@ class WeaveLayer(Layer):
          tf.stack([atom_features] * max_atoms, axis=1)
      ], 3)
      AP_combine_t = tf.transpose(AP_combine, perm=[0, 2, 1, 3])
      AP = tf.tensordot(AP_combine + AP_combine_t, self.W_AP,
                        [[3], [0]]) + self.b_AP
      AP = tf.tensordot(AP_combine + AP_combine_t, self.W_AP, [[3], [0]
                                                              ]) + self.b_AP
      AP = self.activation(AP)
      PP = tf.tensordot(pair_features, self.W_PP, [[3], [0]]) + self.b_PP
      PP = self.activation(PP)