提交 28129eeb authored 作者: Frederic Bastien's avatar Frederic Bastien

Work around to reload old pickle file. We should find a better fix. We should…

Work around to reload old pickle file. We should find a better fix. We should reload all code files when we unpickle
上级 6af98f5c
...@@ -373,6 +373,10 @@ class GpuDnnConv(DnnBase, COp): ...@@ -373,6 +373,10 @@ class GpuDnnConv(DnnBase, COp):
self.algo = config.dnn.conv.algo_fwd self.algo = config.dnn.conv.algo_fwd
if not hasattr(self, 'inplace'): if not hasattr(self, 'inplace'):
self.inplace = False self.inplace = False
# Work around to reload old pickle.
# We need to find the new file name and reload c code.
self.__init__(**self._props_dict())
def get_op_params(self): def get_op_params(self):
if self.inplace: if self.inplace:
...@@ -864,6 +868,7 @@ class GpuDnnConvGradI(DnnBase, COp): ...@@ -864,6 +868,7 @@ class GpuDnnConvGradI(DnnBase, COp):
self.algo = config.dnn.conv.algo_bwd_data self.algo = config.dnn.conv.algo_bwd_data
if not hasattr(self, 'inplace'): if not hasattr(self, 'inplace'):
self.inplace = False self.inplace = False
self.__init__(**self._props_dict())
def grad(self, inp, grads): def grad(self, inp, grads):
kerns, top, output, desc, alpha, beta = inp kerns, top, output, desc, alpha, beta = inp
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论