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):
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
......
Markdown is supported
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