deepmd.tf.descriptor.se
Module Contents
Classes
A base class for smooth version of descriptors. |
- class deepmd.tf.descriptor.se.DescrptSe[source]
Bases:
deepmd.tf.descriptor.descriptor.Descriptor
A base class for smooth version of descriptors.
Notes
All of these descriptors have an environmental matrix and an embedding network (
deepmd.tf.utils.network.embedding_net()
), so they can share some similiar methods without defining them twice.- Attributes:
- _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)[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(global_jdata: dict, local_jdata: dict)[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:
dict
The converted network data