xnn.gnn.constants.restore_exact#

xnn.gnn.constants.restore_exact(buf, exact)[source]#

Copy exact into the float64 buf when they differ by rounding only.

A larger difference means the stored value is not this constant (a fitted scale, or a checkpoint’s own coupling basis, which can differ from a fresh one across e3nn versions), and it is kept. Returns whether buf changed.

Parameters:
Return type:

bool