提交 de54f161 authored 作者: Frederic's avatar Frederic

Allow to unpickle again GpuConv

上级 5ef9acdb
...@@ -1804,6 +1804,12 @@ class GpuConv(GpuOp): ...@@ -1804,6 +1804,12 @@ class GpuConv(GpuOp):
self.max_threads_dim0 = None self.max_threads_dim0 = None
if not hasattr(self, "direction_hint"): if not hasattr(self, "direction_hint"):
self.direction_hint = None self.direction_hint = None
if not hasattr(self, "nkern"):
self.nkern = None
if not hasattr(self, "bsize"):
self.bsize = None
if not hasattr(self, "fft_opt"):
self.fft_opt = True
def __hash__(self): def __hash__(self):
# don't use hash(self.version) as hash(-1)==-2 and # don't use hash(self.version) as hash(-1)==-2 and
......
...@@ -120,6 +120,12 @@ class GpuConv(gof.Op): ...@@ -120,6 +120,12 @@ class GpuConv(gof.Op):
self.max_threads_dim0 = None self.max_threads_dim0 = None
if not hasattr(self, "direction_hint"): if not hasattr(self, "direction_hint"):
self.direction_hint = None self.direction_hint = None
if not hasattr(self, "nkern"):
self.nkern = None
if not hasattr(self, "bsize"):
self.bsize = None
if not hasattr(self, "fft_opt"):
self.fft_opt = True
def __hash__(self): def __hash__(self):
# don't use hash(self.version) as hash(-1)==-2 and # don't use hash(self.version) as hash(-1)==-2 and
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论