提交 0e89f1ee authored 作者: Ian Goodfellow's avatar Ian Goodfellow

removed a grad_undefined that was causing some tests to fail

上级 ec9aa6b7
...@@ -2336,7 +2336,7 @@ class MaxAndArgmax(Op): ...@@ -2336,7 +2336,7 @@ class MaxAndArgmax(Op):
# Set the grad to the correct position. # Set the grad to the correct position.
g_x = eq(xmax_pad, x) * g_max_pad g_x = eq(xmax_pad, x) * g_max_pad
return g_x, grad_undefined(self, 1, axis) return g_x, None
def __str__(self): def __str__(self):
return self.__class__.__name__ return self.__class__.__name__
...@@ -5645,11 +5645,11 @@ def tile(x, reps, ndim=None): ...@@ -5645,11 +5645,11 @@ def tile(x, reps, ndim=None):
TODO: expand this. TODO: expand this.
""" """
try: try:
assert python_all([int(i) == i for i in iter(reps)]) assert python_all([int(i) == i for i in iter(reps)])
except (TypeError, AssertionError): except (TypeError, AssertionError):
raise ValueError("reps argument to tile must be a constant (e.g. " raise ValueError("reps argument to tile must be a constant (e.g. "
"tuple, list of integers)") "tuple, list of integers)")
if len(reps) != x.ndim: if len(reps) != x.ndim:
raise ValueError("len(reps) != x.ndim not currently supported") raise ValueError("len(reps) != x.ndim not currently supported")
elif (ndim is not None) and ndim != x.ndim: elif (ndim is not None) and ndim != x.ndim:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论