Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
sec2.1_ml
deeplearning
Commits
40b5ea75
Commit
40b5ea75
authored
Aug 02, 2018
by
Marius Kriegerowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle OOM exception in optimizer
parent
9a64146e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
pinky/src/optimize.py
pinky/src/optimize.py
+5
-1
No files found.
pinky/src/optimize.py
View file @
40b5ea75
...
...
@@ -95,7 +95,11 @@ class Optimizer(Object):
args
=
dict
(
zip
(
self
.
optimizer_keys
,
args
))
self
.
model
.
outdir
=
self
.
log_dir_name
(
args
)
self
.
announce_test
(
args
)
return
self
.
model
.
train
(
args
)[
'loss'
]
try
:
return
self
.
model
.
train
(
args
)[
'loss'
]
except
tf
.
errors
.
ResourceExhaustedError
as
e
:
logger
.
warn
(
e
)
logger
.
warn
(
'Skipping this test'
)
def
optimize
(
self
,
model
):
'''Calling this method to optimize a :py:class:`pinky.model.Model`
...
...
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