提交 8ff84914 authored 作者: Frederic Bastien's avatar Frederic Bastien

added MaxAndArgmax.__eq__ and .__hash__ to help find the optimization stochostic order problem.

上级 c52d77ef
......@@ -1390,6 +1390,11 @@ class MaxAndArgmax(Op):
nout=2 # max val, max idx
E_axis = 'invalid axis'
def __eq__(self,other):
return type(self)==type(other)
def __hash__(self):
return hash(type(self))
def make_node(self, x, axis=None):
x = _as_tensor_variable(x)
if axis is None:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论