提交 95022ce2 authored 作者: Iban Harlouchet's avatar Iban Harlouchet

__props__ for theano/tensor/raw_random.py

上级 1a45cf8d
......@@ -102,6 +102,7 @@ class RandomFunction(gof.Op):
"""Op that draws random numbers from a numpy.random.RandomState object
"""
__props__ = ("fn", "outtype", "inplace", "ndim_added")
def __init__(self, fn, outtype, inplace=False, ndim_added=0):
"""
......@@ -129,17 +130,6 @@ class RandomFunction(gof.Op):
"""
self.__setstate__([fn, outtype, inplace, ndim_added])
def __eq__(self, other):
return type(self) == type(other) \
and self.fn == other.fn\
and self.outtype == other.outtype\
and self.inplace == other.inplace\
and self.ndim_added == other.ndim_added
def __hash__(self):
return (hash(type(self)) ^ hash(self.fn) ^ hash(self.outtype) ^
hash(self.inplace) ^ hash(self.ndim_added))
def __getstate__(self):
return self.state
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论