deepmd.tf.entrypoints.compress

Compress a model, which including tabulating the embedding-net.

Module Contents

Functions

compress(*, input, output, extrapolate, step, ...)

Compress model.

deepmd.tf.entrypoints.compress.compress(*, input: str, output: str, extrapolate: int, step: float, frequency: str, checkpoint_folder: str, training_script: str, mpi_log: str, log_path: str | None, log_level: int, **kwargs)[source]

Compress model.

The table is composed of fifth-order polynomial coefficients and is assembled from two sub-tables. The first table takes the step parameter as the domain’s uniform step size, while the second table takes 10 * step as it’s uniform step size. The range of the first table is automatically detected by the code, while the second table ranges from the first table’s upper boundary(upper) to the extrapolate(parameter) * upper.

Parameters:
inputstr

frozen model file to compress

outputstr

compressed model filename

extrapolateint

scale of model extrapolation

stepfloat

uniform step size of the tabulation’s first table

frequencystr

frequency of tabulation overflow check

checkpoint_folderstr

trining checkpoint folder for freezing

training_scriptstr

training script of the input frozen model

mpi_logstr

mpi logging mode for training

log_pathOptional[str]

if speccified log will be written to this file

log_levelint

logging level

**kwargs

additional arguments