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)[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 “relu”, “tanh”, “none”, “linear”, “softplus”, “sigmoid”, “relu6”, “gelu”, “gelu_tf”.
- precision
The precision of the embedding net parameters. Supported options are “float32”, “default”, “float16”, “float64”.
- 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.
- ntypes
- call() numpy.ndarray [source]
Compute the type embedding network.