Skip to main content

Module statistics

Module statistics 

Source
Expand description

Statistics section — binary encode/decode.

The statistics section is a fixed 72-byte block present when the HAS_STATISTICS flag is set. All fields are advisory (optimization hints) and MUST NOT be relied upon for correctness.

Wire layout (all little-endian):

offset  0: computed_mask   uint32
offset  4: _reserved       uint32   MUST be 0
offset  8: nnz             uint64
offset 16: sparsity_ratio  float64
offset 24: value_min       float64
offset 32: value_max       float64
offset 40: value_abs_max   float64
offset 48: value_mean      float64
offset 56: value_stddev    float64
offset 64: nm_n            uint8
offset 65: nm_m            uint8
offset 66: has_nan         uint8  (0x01 or 0x00)
offset 67: has_inf         uint8  (0x01 or 0x00)
offset 68: _reserved2      uint8[4]  MUST be 0

Total = 72 bytes.

Structs§

Statistics
Advisory statistics about a tensor’s data buffer.
StatisticsMask
Bitmask identifying which statistics fields contain valid data.