Commit 2895148f authored by Tiago de Freitas Pereira's avatar 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
...@@ -107,8 +107,14 @@ class FaceNet(object): ...@@ -107,8 +107,14 @@ class FaceNet(object):
return img[None, ...] return img[None, ...]
def load_model(self): 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.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: if self.model_path is None:
self.model_path = self.get_modelpath() self.model_path = self.get_modelpath()
...@@ -188,8 +194,7 @@ class FaceNet(object): ...@@ -188,8 +194,7 @@ class FaceNet(object):
def __setstate__(self, d): def __setstate__(self, d):
# Handling unpicklable objects # Handling unpicklable objects
self.__dict__ = d self.__dict__ = d
self.load_model()
def __getstate__(self): def __getstate__(self):
# Handling unpicklable objects # Handling unpicklable objects
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment