Skip to content

save or load checkpoint #7

@rancheng

Description

@rancheng

print('Epoch [{}/{}], Step [{}/{}], Loss: {:.4f}'.format(
epoch + 1,
args.epochs,
i + 1,
total_step,
loss.item())
)

could you add the save model line to the example to be more complete. Thanks!

torch.save(model.state_dict(), CHECKPOINT_PATH)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions