提交 c00b8cf2 authored 作者: affanv14's avatar affanv14

add setstate for GPUCorrMM

上级 aa00cd6c
...@@ -534,6 +534,17 @@ class BaseGpuCorrMM(CGpuKernelBase): ...@@ -534,6 +534,17 @@ class BaseGpuCorrMM(CGpuKernelBase):
str(self.filter_dilation), str(self.filter_dilation),
str(self.num_groups)) str(self.num_groups))
def __setstate__(self, d):
self.__dict__.update(d)
if not hasattr(self, 'border_mode'):
self.border_mode = "valid"
if not hasattr(self, 'subsample'):
self.subsample = (1, 1)
if not hasattr(self, 'filter_dilation'):
self.filter_dilation = (1, 1)
if not hasattr(self, 'num_groups'):
self.num_groups = 1
def flops(self, inp, outp): def flops(self, inp, outp):
""" """
Useful with the hack in profilemode to print the MFlops. Useful with the hack in profilemode to print the MFlops.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论