提交 bc1392a3 authored 作者: David Warde-Farley's avatar David Warde-Farley 提交者: Arnaud Bergeron

Fix flake errors.

上级 19e2d992
......@@ -20,8 +20,7 @@ from theano import gof
from theano.compat import get_unbound_function
from six import string_types, iteritems, itervalues
from six.moves import StringIO, xrange
from theano.gof import (FunctionGraph, graph, utils, link,
ops_with_inner_function)
from theano.gof import (graph, utils, link, ops_with_inner_function)
from theano.gof.link import raise_with_op
from theano.configparser import (config, AddConfigVar, BoolParam, IntParam,
StrParam)
......
"""Define the `function` function
"""
__docformat__ = "restructuredtext en"
import six.moves.cPickle as pickle
import logging
......
......@@ -1014,8 +1014,8 @@ class FunctionMaker(object):
continue
else:
flags = []
for output_new, output_old, i in zip(
outputs_new, outputs_old, xrange(len(outputs_new))):
for i, (output_new, output_old) in enumerate(
zip(outputs_new, outputs_old)):
print('loop through outputs node for both graphs')
graph_old.variables = set(gof.graph.variables(
graph_old.inputs, graph_old.outputs))
......
......@@ -571,7 +571,8 @@ def as_op(itypes, otypes, infer_shape=None):
itypes = list(itypes)
otypes = list(otypes)
if infer_shape is not None and not isinstance(infer_shape, collections.Callable):
if infer_shape is not None and not isinstance(infer_shape,
collections.Callable):
raise TypeError("infer_shape needs to be a callable")
def make_op(fn):
......
......@@ -7,7 +7,6 @@ import warnings
import theano
from theano import config
from theano.compat import reload
from theano.gof.compilelock import get_lock, release_lock
from theano.gof import cmodule
import imp
......
import theano
from theano.gof.utils import give_variables_names, unique, remove
from six.moves import xrange
def test_give_variables_names():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论