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

Fix flake errors.

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