MCPcopy Create free account
hub / github.com/Walter0807/MotionBERT / save_checkpoint

Function save_checkpoint

train.py:46–54  ·  view source on GitHub ↗
(chk_path, epoch, lr, optimizer, model_pos, min_loss)

Source from the content-addressed store, hash-verified

44 torch.manual_seed(seed)
45
46def save_checkpoint(chk_path, epoch, lr, optimizer, model_pos, min_loss):
47 print('Saving checkpoint to', chk_path)
48 torch.save({
49 'epoch': epoch + 1,
50 'lr': lr,
51 'optimizer': optimizer.state_dict(),
52 'model_pos': model_pos.state_dict(),
53 'min_loss' : min_loss
54 }, chk_path)
55
56def evaluate(args, model_pos, test_loader, datareader):
57 print('INFO: Testing')

Callers 1

train_with_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected