提交 67562829 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

fixed determinism check

上级 cf655c6f
......@@ -8,9 +8,10 @@ from theano.gof.python25 import OrderedDict
import types
def check_deterministic(iterable, known_deterministic):
if not isinstance(iterable, (list, tuple, OrderedSet)) or \
(isinstance(iterable, types.GeneratorType and known_deterministic)):
raise TypeError((type(iterable), known_deterministic))
if not isinstance(iterable, (list, tuple, OrderedSet)):
if not isinstance(iterable, types.GeneratorType) and \
known_deterministic:
raise TypeError((type(iterable), known_deterministic))
if MutableSet is not None:
# From http://code.activestate.com/recipes/576694/
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论