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 Dec 18, 2023
1 parent 382503b commit 8cefbb1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions deepmd/fit/dipole.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
from typing import List
from typing import Optional

import numpy as np
from paddle import nn

Expand Down Expand Up @@ -242,7 +243,9 @@ def forward(

if type_embedding is not None:
nloc_mask = paddle.reshape(
paddle.tile(paddle.repeat_interleave(self.sel_mask, natoms[2:]), [nframes]),
paddle.tile(
paddle.repeat_interleave(self.sel_mask, natoms[2:]), [nframes]
),
[nframes, -1],
)
atype_nall = paddle.reshape(atype, [-1, natoms[1]])
Expand All @@ -253,9 +256,7 @@ def forward(
self.nloc_masked = paddle.shape(
paddle.reshape(self.atype_nloc_masked, [nframes, -1])
)[1]
atype_embed = nn.embedding_lookup(
type_embedding, self.atype_nloc_masked
)
atype_embed = nn.embedding_lookup(type_embedding, self.atype_nloc_masked)
else:
atype_embed = None

Expand Down
2 changes: 1 addition & 1 deletion deepmd/model/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def forward(

rot_mat = self.descrpt.get_rot_mat()
rot_mat = paddle.clone(rot_mat, name="o_rot_mat" + suffix)

output = self.fitting(
dout, rot_mat, natoms, input_dict, reuse=reuse, suffix=suffix
)
Expand Down
2 changes: 1 addition & 1 deletion deepmd/train/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
from deepmd.env import tf
from deepmd.env import tfv2
from deepmd.fit import Fitting
from deepmd.fit import ener
from deepmd.fit import dipole
from deepmd.fit import ener
from deepmd.loss import DOSLoss
from deepmd.loss import EnerDipoleLoss
from deepmd.loss import EnerSpinLoss
Expand Down

0 comments on commit 8cefbb1

Please sign in to comment.