pylibmgm.io.parse_dd_file_gm

pylibmgm.io.parse_dd_file_gm(dd_file: os.PathLike, unary_constant: float = 0.0) pylibmgm.GmModel

Parse a .dd file containing a pairwise GM model.

Parameters:
  • gm_dd_file (os.PathLike) – Path to the .dd file to parse.

  • unary_constant (float, optional) – Constant value to add to all unary costs. Default is 0.0.

Returns:

The parsed GM model.

Return type:

GmModel