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

fix test crash in debugmode.

it was triing the Image2Neibs.perform method for GpuImage2Neibs.
上级 40ca10ee
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
TODO: implement Images2Neibs.infer_shape() methods TODO: implement Images2Neibs.infer_shape() methods
""" """
import theano
from theano import Op, Apply from theano import Op, Apply
import theano.tensor as T import theano.tensor as T
from theano.gradient import grad_not_implemented from theano.gradient import grad_not_implemented
...@@ -111,6 +112,9 @@ class Images2Neibs(Op): ...@@ -111,6 +112,9 @@ class Images2Neibs(Op):
def perform(self, node, inp, out_): def perform(self, node, inp, out_):
ten4, neib_shape, neib_step = inp ten4, neib_shape, neib_step = inp
z, = out_ z, = out_
# GpuImages2Neibs should not run this perform in DebugMode
if type(self) != Images2Neibs:
raise theano.gof.utils.MethodNotDefined()
def CEIL_INTDIV(a, b): def CEIL_INTDIV(a, b):
if a % b: if a % b:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论