MCPcopy Create free account
hub / github.com/ImprintLab/Medical-SAM2 / save_checkpoint

Function save_checkpoint

func_3d/utils.py:84–88  ·  view source on GitHub ↗
(states, is_best, output_dir,
                    filename='checkpoint.pth')

Source from the content-addressed store, hash-verified

82 return path_dict
83
84def save_checkpoint(states, is_best, output_dir,
85 filename='checkpoint.pth'):
86 torch.save(states, os.path.join(output_dir, filename))
87 if is_best:
88 torch.save(states, os.path.join(output_dir, 'checkpoint_best.pth'))
89
90def random_click(mask, point_labels = 1, seed=None):
91 # check if all masks are black

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected