Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
SparseConvNet
Commits
784994a5
Commit
784994a5
authored
Jul 31, 2017
by
Benjamin Thomas Graham
Browse files
checkpointing
parent
00ad22e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
PyTorch/sparseconvnet/legacy/classificationTrainValidate.py
PyTorch/sparseconvnet/legacy/classificationTrainValidate.py
+2
-2
examples/Assamese_handwriting/VGGplus.py
examples/Assamese_handwriting/VGGplus.py
+1
-1
No files found.
PyTorch/sparseconvnet/legacy/classificationTrainValidate.py
View file @
784994a5
...
@@ -49,11 +49,11 @@ def ClassificationTrainValidate(model, dataset, p):
...
@@ -49,11 +49,11 @@ def ClassificationTrainValidate(model, dataset, p):
'weightDecay'
:
p
[
'weightDecay'
],
'weightDecay'
:
p
[
'weightDecay'
],
'epoch'
:
1
'epoch'
:
1
}
}
if
os
.
path
.
isfile
(
'epoch.pth'
):
if
p
[
'checkPoint'
]
and
os
.
path
.
isfile
(
'epoch.pth'
):
optimState
[
'epoch'
]
=
torch
.
load
(
'epoch.pth'
)
+
1
optimState
[
'epoch'
]
=
torch
.
load
(
'epoch.pth'
)
+
1
print
(
'Restarting at epoch '
+
print
(
'Restarting at epoch '
+
str
(
optimState
[
'epoch'
])
+
str
(
optimState
[
'epoch'
])
+
' from model.p
ickle
..'
)
' from model.p
th
..'
)
model
=
torch
.
load
(
'model.pth'
)
model
=
torch
.
load
(
'model.pth'
)
print
(
p
)
print
(
p
)
...
...
examples/Assamese_handwriting/VGGplus.py
View file @
784994a5
...
@@ -35,4 +35,4 @@ print('input spatial size', spatial_size)
...
@@ -35,4 +35,4 @@ print('input spatial size', spatial_size)
dataset
=
getIterators
(
spatial_size
,
63
,
3
)
dataset
=
getIterators
(
spatial_size
,
63
,
3
)
scn
.
ClassificationTrainValidate
(
scn
.
ClassificationTrainValidate
(
model
,
dataset
,
model
,
dataset
,
{
'nEpochs'
:
100
,
'initial_LR'
:
0.1
,
'LR_decay'
:
0.05
,
'weightDecay'
:
1e-4
})
{
'nEpochs'
:
100
,
'initial_LR'
:
0.1
,
'LR_decay'
:
0.05
,
'weightDecay'
:
1e-4
,
'checkPoint'
:
False
})
Write
Preview
Markdown
is supported
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