提交 a76fc7f8 authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #3626 from sieben/comparisons_with_None

Fix comparisons with None
......@@ -556,7 +556,7 @@ class T_function(unittest.TestCase):
for key, val in iteritems(func.fn.storage_map):
if not isinstance(key, theano.gof.Constant):
assert (val[0] == None)
assert (val[0] is None)
class T_picklefunction(unittest.TestCase):
......
......@@ -919,7 +919,7 @@ def scan(fn,
givens.update(OrderedDict(izip(other_scan_args, other_inner_args)))
if strict:
non_seqs_set = set(non_sequences if non_sequences != None else [])
non_seqs_set = set(non_sequences if non_sequences is not None else [])
other_shared_scan_args = [arg.variable for arg
in dummy_f.maker.expanded_inputs
......
......@@ -781,7 +781,7 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
for i, maxpoolshp in enumerate(maxpoolshps):
for j, ignore_border in enumerate([True, False]):
for k, padding in enumerate([(0,0), (1,1), (1,2)]):
if out_shapes[k][i][j] == None:
if out_shapes[k][i][j] is None:
continue
# checking shapes generated by DownsampleFactorMax
self._compile_and_check([image],
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论