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
bob
bob.ip.tensorflow_extractor
Commits
2895148f
Commit
2895148f
authored
May 20, 2020
by
Tiago de Freitas Pereira
Browse files
This might have solved the dask issue
parent
b2044c7f
Pipeline
#39985
failed with stage
in 13 minutes and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/ip/tensorflow_extractor/FaceNet.py
View file @
2895148f
...
...
@@ -107,8 +107,14 @@ class FaceNet(object):
return
img
[
None
,
...]
def
load_model
(
self
):
tf
.
compat
.
v1
.
reset_default_graph
()
session_conf
=
tf
.
ConfigProto
(
intra_op_parallelism_threads
=
1
,
inter_op_parallelism_threads
=
1
)
self
.
graph
=
tf
.
Graph
()
self
.
session
=
tf
.
compat
.
v1
.
Session
(
graph
=
self
.
graph
)
self
.
session
=
tf
.
compat
.
v1
.
Session
(
graph
=
self
.
graph
,
config
=
session_conf
)
if
self
.
model_path
is
None
:
self
.
model_path
=
self
.
get_modelpath
()
...
...
@@ -188,8 +194,7 @@ class FaceNet(object):
def
__setstate__
(
self
,
d
):
# Handling unpicklable objects
self
.
__dict__
=
d
self
.
load_model
()
self
.
__dict__
=
d
def
__getstate__
(
self
):
# Handling unpicklable objects
...
...
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