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

Patched the serialization mechenism

parent 7961dac3
......@@ -140,7 +140,7 @@ class DCTBlocks(TransformerMixin, BaseEstimator):
return self
def __getstate__(self):
d = dict(self.__dict__)
d = self.__dict__.copy()
d.pop("dct_features")
return d
......
......@@ -8,7 +8,7 @@ import bob.io.base
import numpy
import math
from bob.bio.base.extractor import Extractor
import copy
class GridGraph(Extractor):
"""Extracts Gabor jets in a grid structure [GHW12]_ using functionalities from :ref:`bob.ip.gabor <bob.ip.gabor>`.
......@@ -278,11 +278,12 @@ class GridGraph(Extractor):
pass
def __getstate__(self):
d = dict(self.__dict__)
d = self.__dict__.copy()
d.pop("gwt")
d.pop("_aligned_graph")
if "_graph" in d:
d.pop("_graph")
return d
def __setstate__(self, d):
......
......@@ -281,7 +281,7 @@ class LGBPHS(TransformerMixin, BaseEstimator):
return _extract(X)
def __getstate__(self):
d = dict(self.__dict__)
d = self.__dict__.copy()
d.pop("lbp")
d.pop("gwt")
return d
......
......@@ -347,7 +347,7 @@ class FaceCrop(Base):
def __getstate__(self):
d = dict(self.__dict__)
d = self.__dict__.copy()
d.pop("mask_rng")
d.pop("cropper")
return d
......
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