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 Mar 14, 2024
1 parent a61f462 commit e5b6cf0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions deepmd/tf/fit/dos.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,11 @@ def build(

final_layer = tf.reshape(
final_layer,
[tf.shape(inputs)[0] ,natoms[2 + type_i],self.numb_dos, ],
[
tf.shape(inputs)[0],
natoms[2 + type_i],
self.numb_dos,
],
)
outs_list.append(final_layer)
start_index += natoms[2 + type_i]
Expand Down Expand Up @@ -557,7 +561,12 @@ def build(
)

outs = tf.reshape(
final_layer, [tf.shape(inputs)[0] ,natoms[2 + type_i],self.numb_dos, ],
final_layer,
[
tf.shape(inputs)[0],
natoms[2 + type_i],

Check failure

Code scanning / CodeQL

Potentially uninitialized local variable Error

Local variable 'type_i' may be used before it is initialized.
self.numb_dos,
],
)
# add bias
# self.atom_ener_before = outs
Expand Down

0 comments on commit e5b6cf0

Please sign in to comment.