Skip to content

Commit

Permalink
Update deepmd/dpmodel/utils/type_embed.py
Browse files Browse the repository at this point in the history
Co-authored-by: Han Wang <[email protected]>
Signed-off-by: Duo <[email protected]>
  • Loading branch information
iProzd and wanghan-iapcm authored May 15, 2024
1 parent 0cc6af9 commit d2e0db0
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions deepmd/dpmodel/utils/type_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,13 @@ def __init__(
[electronic_configuration_embedding[kk] for kk in self.type_map],
dtype=PRECISION_DICT[self.precision],
)
self.embedding_net = EmbeddingNet(
ECONF_DIM,
self.neuron,
self.activation_function,
self.resnet_dt,
self.precision,
)
else:
self.embedding_net = EmbeddingNet(
ntypes,
self.neuron,
self.activation_function,
self.resnet_dt,
self.precision,
)
self.embedding_net = EmbeddingNet(
ECONF_DIM if self.use_econf_tebd else ntypes,

Check failure

Code scanning / CodeQL

Potentially uninitialized local variable Error

Local variable 'ECONF_DIM' may be used before it is initialized.
self.neuron,
self.activation_function,
self.resnet_dt,
self.precision,
)

def call(self) -> np.ndarray:
"""Compute the type embedding network."""
Expand Down

0 comments on commit d2e0db0

Please sign in to comment.