deepmd.tf.descriptor.se#
Classes#
A base class for smooth version of descriptors. |
Module Contents#
- class deepmd.tf.descriptor.se.DescrptSe[source]#
Bases:
deepmd.tf.descriptor.descriptor.DescriptorA base class for smooth version of descriptors.
- Attributes:
Notes
All of these descriptors have an environmental matrix and an embedding network (
deepmd.tf.utils.network.embedding_net()), so they can share some similar methods without defining them twice.- _identity_tensors(suffix: str = '') None[source]#
Identify tensors which are expected to be stored and restored.
- Parameters:
- suffix
str The suffix of the scope
- suffix
Notes
- These tensors will be indentitied:
self.descrpt_reshape : o_rmat self.descrpt_deriv : o_rmat_deriv self.rij : o_rij self.nlist : o_nlist
Thus, this method should be called during building the descriptor and after these tensors are initialized.
- pass_tensors_from_frz_model(descrpt_reshape: deepmd.tf.env.tf.Tensor, descrpt_deriv: deepmd.tf.env.tf.Tensor, rij: deepmd.tf.env.tf.Tensor, nlist: deepmd.tf.env.tf.Tensor) None[source]#
Pass the descrpt_reshape tensor as well as descrpt_deriv tensor from the frz graph_def.
- Parameters:
- descrpt_reshape
The passed descrpt_reshape tensor
- descrpt_deriv
The passed descrpt_deriv tensor
- rij
The passed rij tensor
- nlist
The passed nlist tensor
- init_variables(graph: deepmd.tf.env.tf.Graph, graph_def: deepmd.tf.env.tf.GraphDef, suffix: str = '') None[source]#
Init the embedding net variables with the given dict.
- classmethod update_sel(train_data: deepmd.utils.data_system.DeepmdDataSystem, type_map: list[str] | None, local_jdata: dict) tuple[dict, float | None][source]#
Update the selection and perform neighbor statistics.
- serialize_network(ntypes: int, ndim: int, in_dim: int, neuron: list[int], activation_function: str, resnet_dt: bool, variables: dict, excluded_types: set[tuple[int, int]] = set(), suffix: str = '') dict[source]#
Serialize network.
- Parameters:
- ntypes
int The number of types
- ndim
int The dimension of elements
- in_dim
int The input dimension
- neuron
list[int] The neuron list
- activation_function
str The activation function
- resnet_dtbool
Whether to use resnet
- variables
dict The input variables
- excluded_types
set[tuple[int,int]],optional The excluded types
- suffix
str,optional The suffix of the scope
- ntypes
- Returns:
dictThe converted network data