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

Function save_checkpoint

func_2d/utils.py:223–227  ·  view source on GitHub ↗
(states, is_best, output_dir,
                    filename='checkpoint.pth')

Source from the content-addressed store, hash-verified

221
222
223def save_checkpoint(states, is_best, output_dir,
224 filename='checkpoint.pth'):
225 torch.save(states, os.path.join(output_dir, filename))
226 if is_best:
227 torch.save(states, os.path.join(output_dir, 'checkpoint_best.pth'))
228
229
230

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected