deepmd.dpmodel.utils.type_embed
Module Contents
Classes
Type embedding network. |
- class deepmd.dpmodel.utils.type_embed.TypeEmbedNet(*, ntypes: int, neuron: List[int], resnet_dt: bool = False, activation_function: str = 'tanh', precision: str = 'default', trainable: bool = True, seed: int | None = None, padding: bool = False, use_econf_tebd: bool = False, type_map: List[str] | None = None)[source]
Bases:
deepmd.dpmodel.common.NativeOP
Type embedding network.
- Parameters:
- ntypes
int
Number of atom types
- neuron
list
[int
] Number of neurons in each hidden layers of the embedding net
- resnet_dt
Time-step dt in the resnet construction: y = x + dt * phi (Wx + b)
- activation_function
The activation function in the embedding net. Supported options are “tanh”, “linear”, “sigmoid”, “gelu”, “gelu_tf”, “relu”, “softplus”, “none”, “relu6”.
- precision
The precision of the embedding net parameters. Supported options are “float32”, “default”, “float64”, “float16”.
- trainable
If the weights of embedding net are trainable.
- seed
Random seed for initializing the network parameters.
- padding
Concat the zero padding to the output, as the default embedding of empty type.
- use_econf_tebd: bool, Optional
Whether to use electronic configuration type embedding.
- type_map: List[str], Optional
A list of strings. Give the name to each type of atoms. Only used if use_econf_tebd is True in type embedding net.
- ntypes
- call() numpy.ndarray [source]
Compute the type embedding network.