Skip to main content

Module weights

Module weights 

Source
Expand description

Binary weight file loader for pre-trained ANI models.

Simple binary format:

  • u32: number of element types
  • For each element type:
    • u8: atomic number
    • u32: number of layers
    • For each layer:
      • u32: rows (output_dim)
      • u32: cols (input_dim)
      • f64 × (rows × cols): weights (row-major)
      • f64 × rows: bias
      • u8: activation (0=None, 1=Gelu, 2=Celu)

Functions§

load_weights
Load ANI model weights from a binary reader.
make_test_model
Create a tiny test model for one element (for unit tests).
save_weights
Save ANI model weights to a binary writer.