提交 9f3eb6db authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix some pep8/pyflakes violations

上级 a885bfb0
...@@ -562,8 +562,6 @@ class T_CrossentropyCategorical1Hot(utt.InferShapeTester): ...@@ -562,8 +562,6 @@ class T_CrossentropyCategorical1Hot(utt.InferShapeTester):
def test_get_rid_of_advanced_indexing_version_of_xent(self): def test_get_rid_of_advanced_indexing_version_of_xent(self):
verbose = 0 verbose = 0
if verbose:
from theano.printing import pprint
# TODO: add the optimization in FAST_COMPILE? # TODO: add the optimization in FAST_COMPILE?
# In the mean time, run it as 'FAST_RUN' instead # In the mean time, run it as 'FAST_RUN' instead
mode = theano.compile.mode.get_default_mode() mode = theano.compile.mode.get_default_mode()
...@@ -727,10 +725,8 @@ class T_CrossentropyCategorical1Hot(utt.InferShapeTester): ...@@ -727,10 +725,8 @@ class T_CrossentropyCategorical1Hot(utt.InferShapeTester):
mode = 'FAST_RUN' mode = 'FAST_RUN'
rng = numpy.random.RandomState(utt.fetch_seed()) rng = numpy.random.RandomState(utt.fetch_seed())
x_val = rng.randn(3, 5).astype(config.floatX) x_val = rng.randn(3, 5).astype(config.floatX)
b_val = rng.randn(5).astype(config.floatX)
y_val = numpy.asarray([2, 4, 1], dtype='int64') y_val = numpy.asarray([2, 4, 1], dtype='int64')
x = T.matrix('x') x = T.matrix('x')
b = T.vector('b')
y = T.lvector('y') y = T.lvector('y')
yi = T.cast(y, 'int32') yi = T.cast(y, 'int32')
expressions = [ expressions = [
...@@ -963,10 +959,8 @@ class T_CrossentropyCategorical1Hot(utt.InferShapeTester): ...@@ -963,10 +959,8 @@ class T_CrossentropyCategorical1Hot(utt.InferShapeTester):
mode = 'FAST_RUN' mode = 'FAST_RUN'
rng = numpy.random.RandomState(utt.fetch_seed()) rng = numpy.random.RandomState(utt.fetch_seed())
x_val = rng.randn(3, 5).astype(config.floatX) x_val = rng.randn(3, 5).astype(config.floatX)
b_val = rng.randn(5).astype(config.floatX)
y_val = numpy.asarray([2, 4, 1]) y_val = numpy.asarray([2, 4, 1])
x = T.matrix('x') x = T.matrix('x')
b = T.vector('b')
y = T.lvector('y') y = T.lvector('y')
a = T.scalar('a') a = T.scalar('a')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论