deepmd.tf.model.frozen
Module Contents
Classes
Load model from a frozen model, which cannot be trained. |
- class deepmd.tf.model.frozen.FrozenModel(model_file: str, **kwargs)[source]
Bases:
deepmd.tf.model.model.Model
Load model from a frozen model, which cannot be trained.
- Parameters:
- model_file
str
The path to the frozen model
- model_file
- 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
- 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.
- enable_compression(suffix: str = '') None [source]
Enable compression.
- Parameters:
- suffix
str
suffix to name scope
- suffix
- classmethod update_sel(global_jdata: dict, local_jdata: dict)[source]
Update the selection and perform neighbor statistics.