Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions deepmd/pt/model/task/dipole.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,6 @@ def forward(
# (nframes, nloc, 3)
out = torch.bmm(out, gr).squeeze(-2).view(nframes, nloc, 3)
return {self.var_name: out.to(env.GLOBAL_PT_FLOAT_PRECISION)}

# make jit happy with torch 2.0.0
exclude_types: List[int]
6 changes: 6 additions & 0 deletions deepmd/pt/model/task/ener.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ def forward(
"""
return self._forward_common(descriptor, atype, gr, g2, h2, fparam, aparam)

# make jit happy with torch 2.0.0
exclude_types: List[int]


@Fitting.register("ener")
class EnergyFittingNet(InvarFitting):
Expand Down Expand Up @@ -262,6 +265,9 @@ def serialize(self) -> dict:
"type": "ener",
}

# make jit happy with torch 2.0.0
exclude_types: List[int]


@Fitting.register("direct_force")
@Fitting.register("direct_force_ener")
Expand Down
3 changes: 3 additions & 0 deletions deepmd/pt/model/task/polarizability.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,6 @@ def forward(
out = out + bias

return {self.var_name: out.to(env.GLOBAL_PT_FLOAT_PRECISION)}

# make jit happy with torch 2.0.0
exclude_types: List[int]