提交 2144cc39 authored 作者: Frederic Bastien's avatar Frederic Bastien

make import follow our coding style.

上级 29892371
import unittest import unittest
import numpy
from nose.plugins.skip import SkipTest
import theano import theano
from theano import tensor as T from theano import tensor as T
from theano import tensor
from theano import gof from theano import gof
import numpy
from theano.tests import unittest_tools as utt from theano.tests import unittest_tools as utt
from theano.tensor.tests import test_basic as TT from theano import printing, pprint
from theano import printing from theano.tensor.nnet import (categorical_crossentropy,
from nose.plugins.skip import SkipTest crossentropy_categorical_1hot,
crossentropy_softmax_1hot,
from theano.tensor.nnet import * crossentropy_softmax_1hot_with_bias,
crossentropy_softmax_1hot_with_bias_dx,
crossentropy_softmax_argmax_1hot_with_bias,
sigmoid, softplus,
Softmax, softmax, SoftmaxWithBias, softmax_grad,
softmax_with_bias,
Prepend_scalar_constant_to_each_row,
Prepend_scalar_to_each_row)
class T_sigmoid(unittest.TestCase): class T_sigmoid(unittest.TestCase):
def setUp(self): def setUp(self):
...@@ -786,7 +796,7 @@ def test_argmax_pushdown(): ...@@ -786,7 +796,7 @@ def test_argmax_pushdown():
#for node in env.toposort(): #for node in env.toposort():
#print node.op #print node.op
assert len(env.toposort()) == 2 # an output_guard is second assert len(env.toposort()) == 2 # an output_guard is second
assert env.toposort()[0].op == tensor._max_and_argmax assert env.toposort()[0].op == tensor.basic._max_and_argmax
assert str(env.toposort()[1].op) == 'OutputGuard' assert str(env.toposort()[1].op) == 'OutputGuard'
x = tensor.dmatrix() x = tensor.dmatrix()
#test that the max_and_argmax is not pushed down if the max is used #test that the max_and_argmax is not pushed down if the max is used
......
import unittest import sys
import numpy import numpy
import theano.tensor as T import theano.tensor as T
from theano.configparser import config, AddConfigVar, StrParam from theano.configparser import config, AddConfigVar, StrParam
import os, sys
AddConfigVar('unittests.rseed', AddConfigVar('unittests.rseed',
"Seed to use for randomized unit tests. Special value 'random' means using a seed of None.", "Seed to use for randomized unit tests. Special value 'random' means using a seed of None.",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论