Commit ffcaf266 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Changed serialization mechanism

parent 5e1e99e1
......@@ -10,7 +10,7 @@ import numpy as np
import logging
from sklearn.utils import check_array
from bob.pipelines.sample import SampleBatch
import copy
logger = logging.getLogger(__name__)
......@@ -132,20 +132,14 @@ class TensorflowCompatV1(TransformerMixin, BaseEstimator):
self.__dict__ = d
def __getstate__(self):
import tensorflow as tf
# Handling unpicklable objects
d = self.__dict__
d = self.__dict__.copy()
d.pop("session", None)
d.pop("input_tensor", None)
d.pop("embedding", None)
self.loaded = False
d["loaded"] = False
return d
# def __del__(self):
# tf.compat.v1.reset_default_graph()
def get_modelpath(self, bob_rc_variable, model_subdirectory):
Get default model path.
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