Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 6, 2025
1 parent fc0f88f commit 4390144
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions deepmd/tf/fit/polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,9 @@ def build(
# nframes x nloc_masked
constant_matrix = tf.reshape(
tf.reshape(
tf.tile(tf.repeat(self.t_bias_atom_polar, natoms[2:]), [nframes]),
tf.tile(
tf.repeat(self.t_bias_atom_polar, natoms[2:]), [nframes]
),
[nframes, -1],
)[nloc_mask],
[nframes, -1],
Expand Down Expand Up @@ -518,7 +520,9 @@ def build(
# shift and scale
sel_type_idx = self.sel_type.index(type_i)
final_layer = final_layer * self.scale[sel_type_idx]
final_layer = final_layer + tf.slice(self.t_bias_atom_polar, [sel_type_idx], [1]) * tf.eye(
final_layer = final_layer + tf.slice(
self.t_bias_atom_polar, [sel_type_idx], [1]
) * tf.eye(
3,
batch_shape=[tf.shape(inputs)[0], natoms[2 + type_i]],
dtype=GLOBAL_TF_FLOAT_PRECISION,
Expand Down

0 comments on commit 4390144

Please sign in to comment.