deepmd.tf.model.linear
Module Contents
Classes
Linear model make linear combinations of several existing models. | |
Linear energy model make linear combinations of several existing energy models. |
- class deepmd.tf.model.linear.LinearModel(models: List[dict], weights: List[float], **kwargs)[source]
Bases:
deepmd.tf.model.model.Model
Linear model make linear combinations of several existing models.
- Parameters:
- get_fitting() deepmd.tf.fit.fitting.Fitting | dict [source]
Get the fitting(s).
- init_variables(graph: deepmd.tf.env.tf.Graph, graph_def: deepmd.tf.env.tf.GraphDef, model_type: str = 'original_model', suffix: str = '') None [source]
Init the embedding net variables with the given frozen model.
- class deepmd.tf.model.linear.LinearEnergyModel(models: List[dict], weights: List[float], **kwargs)[source]
Bases:
LinearModel
Linear energy model make linear combinations of several existing energy models.
- build(coord_: deepmd.tf.env.tf.Tensor, atype_: deepmd.tf.env.tf.Tensor, natoms: deepmd.tf.env.tf.Tensor, box: deepmd.tf.env.tf.Tensor, mesh: deepmd.tf.env.tf.Tensor, input_dict: dict, frz_model: str | None = None, ckpt_meta: str | None = None, suffix: str = '', reuse: bool | enum.Enum | None = None) dict [source]
Build the model.
- Parameters:
- coord_
tf.Tensor
The coordinates of atoms
- atype_
tf.Tensor
The atom types of atoms
- natoms
tf.Tensor
The number of atoms
- box
tf.Tensor
The box vectors
- mesh
tf.Tensor
The mesh vectors
- input_dict
dict
The input dict
- frz_model
str
,optional
The path to the frozen model
- ckpt_meta
str
,optional
The path prefix of the checkpoint and meta files
- suffix
str
,optional
The suffix of the scope
- reusebool or
tf.AUTO_REUSE
,optional
Whether to reuse the variables
- coord_
- Returns:
dict
The output dict