File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
pytorch_toolbelt/utils/catalyst Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change
1
+ from typing import Dict
2
+
1
3
import torch
2
4
3
5
__all__ = ["clean_checkpoint" , "report_checkpoint" ]
4
6
5
- from catalyst .dl import Callback , CallbackOrder , RunnerState
6
-
7
7
8
8
def clean_checkpoint (src_fname , dst_fname ):
9
9
"""
10
- Removes optimizer, scheduler and criterion states from checkpoint
10
+ Remove optimizer, scheduler and criterion states from checkpoint
11
11
:param src_fname: Source checkpoint filename
12
12
:param dst_fname: Target checkpoint filename (can be same)
13
13
"""
@@ -22,9 +22,9 @@ def clean_checkpoint(src_fname, dst_fname):
22
22
torch .save (checkpoint , dst_fname )
23
23
24
24
25
- def report_checkpoint (checkpoint ):
25
+ def report_checkpoint (checkpoint : Dict ):
26
26
"""
27
- Prints checkpoint metrics & epoch
27
+ Print checkpoint metrics and epoch number
28
28
:param checkpoint:
29
29
"""
30
30
print ("Epoch :" , checkpoint ["epoch" ])
You can’t perform that action at this time.
0 commit comments