modelzoo.common.pytorch.model_utils.convert_checkpoint.diff_checkpoints#

modelzoo.common.pytorch.model_utils.convert_checkpoint.diff_checkpoints(checkpoint_left: dict, checkpoint_right: dict, tensor_comparison_op: str = 'equal') bool[source]#

Compare state dictionaries of two checkpoints (left and right). Returns True if the dicts are the same. Tensors can be compared via the “equal” or “allclose” operators. All other types are compared for strict equality.