Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.face
Commits
0943c5e7
Commit
0943c5e7
authored
Jun 19, 2020
by
Tiago de Freitas Pereira
Browse files
Changed picklable methods for the embeddings
parent
73f1457f
Pipeline
#40572
failed with stage
in 2 minutes and 52 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
bob/bio/face/embeddings/facenet_sanderberg.py
View file @
0943c5e7
...
...
@@ -223,7 +223,6 @@ class FaceNetSanderberg(TransformerMixin, BaseEstimator):
def
__setstate__
(
self
,
d
):
# Handling unpicklable objects
self
.
__dict__
=
d
self
.
loaded
=
False
def
__getstate__
(
self
):
import
tensorflow
as
tf
...
...
@@ -236,6 +235,7 @@ class FaceNetSanderberg(TransformerMixin, BaseEstimator):
d
.
pop
(
"images_placeholder"
)
if
"images_placeholder"
in
d
else
None
d
.
pop
(
"phase_train_placeholder"
)
if
"phase_train_placeholder"
in
d
else
None
tf
.
compat
.
v1
.
reset_default_graph
()
self
.
loaded
=
False
return
d
def
_more_tags
(
self
):
...
...
bob/bio/face/embeddings/tensorflow_compat_v1.py
View file @
0943c5e7
...
...
@@ -122,8 +122,7 @@ class TensorflowCompatV1(TransformerMixin, BaseEstimator):
def
__setstate__
(
self
,
d
):
# Handling unpicklable objects
self
.
__dict__
=
d
self
.
loaded
=
False
self
.
__dict__
=
d
def
__getstate__
(
self
):
import
tensorflow
as
tf
...
...
@@ -134,6 +133,7 @@ class TensorflowCompatV1(TransformerMixin, BaseEstimator):
d
.
pop
(
"input_tensor"
,
None
)
d
.
pop
(
"embedding"
,
None
)
tf
.
compat
.
v1
.
reset_default_graph
()
self
.
loaded
=
False
return
d
# def __del__(self):
...
...
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