Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrei-Claudiu Roibu
BrainMapper
Commits
8ab6cb09
Commit
8ab6cb09
authored
Mar 30, 2020
by
Andrei-Claudiu Roibu
🖥
Browse files
added save_chekpoint function
parent
0a75ffb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
solver.py
View file @
8ab6cb09
...
...
@@ -239,8 +239,23 @@ class Solver():
def
save_model
(
self
):
pass
def
save_checkpoint
(
self
):
pass
def
save_checkpoint
(
self
,
state
,
filename
):
"""General Checkpoint Save
This function saves a general checkpoint for inference and/or resuming training
Args:
state (dict): Dictionary of all the relevant model components
Returns:
None
Raises:
None
"""
torch
.
save
(
state
,
filename
)
def
load_checkpoint
(
self
):
pass
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment