提交 c4d699c7 authored 作者: Brandon T. Willard's avatar Brandon T. Willard

Apply isort to top-level tests package modules

上级 1be3fe3b
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
""" """
import numpy as np import numpy as np
import numpy.random import numpy.random
import theano
import theano
from tests import unittest_tools as utt from tests import unittest_tools as utt
......
from theano.compile import Mode
import theano import theano
from theano.compile import Mode
from theano.printing import hex_digest from theano.printing import hex_digest
__authors__ = "Ian Goodfellow" __authors__ = "Ian Goodfellow"
__credits__ = ["Ian Goodfellow"] __credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD" __license__ = "3-clause BSD"
......
...@@ -2,12 +2,10 @@ ...@@ -2,12 +2,10 @@
Test for jacobian/hessian functions in Theano Test for jacobian/hessian functions in Theano
""" """
import numpy as np import numpy as np
import theano
from theano import tensor
import theano
from tests import unittest_tools as utt from tests import unittest_tools as utt
from theano import tensor
utt.seed_rng() utt.seed_rng()
......
...@@ -2,10 +2,8 @@ import numpy as np ...@@ -2,10 +2,8 @@ import numpy as np
import theano import theano
import theano.tensor as tt import theano.tensor as tt
from theano.breakpoint import PdbBreakpoint
from tests import unittest_tools as utt from tests import unittest_tools as utt
from theano.breakpoint import PdbBreakpoint
class TestPdbBreakpoint(utt.InferShapeTester): class TestPdbBreakpoint(utt.InferShapeTester):
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Test config options. Test config options.
""" """
from theano.configparser import AddConfigVar, ConfigParam, THEANO_FLAGS_DICT from theano.configparser import THEANO_FLAGS_DICT, AddConfigVar, ConfigParam
class TestConfig: class TestConfig:
......
import numpy as np
import theano
from collections import OrderedDict from collections import OrderedDict
import numpy as np
from six import StringIO from six import StringIO
import theano
from tests import disturb_mem
from tests.record import Record, RecordMode
from theano import config, shared from theano import config, shared
from theano.printing import var_descriptor from theano.printing import var_descriptor
from tests import disturb_mem
from tests.record import RecordMode, Record
def sharedX(x, name=None): def sharedX(x, name=None):
x = np.cast[config.floatX](x) x = np.cast[config.floatX](x)
......
import pytest from collections import OrderedDict
import numpy as np import numpy as np
import pytest
import theano import theano
from tests import unittest_tools as utt
from collections import OrderedDict from theano import change_flags, config, gof, gradient
from theano import gof, change_flags, gradient, config
from theano.gof.null_type import NullType from theano.gof.null_type import NullType
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
from tests import unittest_tools as utt
one = theano.tensor.as_tensor_variable(1.0) one = theano.tensor.as_tensor_variable(1.0)
......
import pytest from functools import reduce
import numpy as np import numpy as np
import pytest
import theano import theano
import theano.ifelse import theano.ifelse
from tests import unittest_tools as utt
from functools import reduce
from theano import tensor from theano import tensor
from theano.ifelse import IfElse, ifelse from theano.ifelse import IfElse, ifelse
from tests import unittest_tools as utt
__docformat__ = "restructedtext en" __docformat__ = "restructedtext en"
__authors__ = "Razvan Pascanu " __authors__ = "Razvan Pascanu "
......
...@@ -12,12 +12,14 @@ The config option is in configdefaults.py ...@@ -12,12 +12,14 @@ The config option is in configdefaults.py
This note is written by Li Yao. This note is written by Li Yao.
""" """
from collections import OrderedDict
import numpy as np import numpy as np
import six.moves.cPickle as pickle import six.moves.cPickle as pickle
import theano import theano
import theano.tensor as tt import theano.tensor as tt
from collections import OrderedDict
floatX = "float32" floatX = "float32"
......
...@@ -3,16 +3,13 @@ Tests of printing functionality ...@@ -3,16 +3,13 @@ Tests of printing functionality
""" """
import logging import logging
import pytest
import numpy as np import numpy as np
import pytest
from six.moves import StringIO
import theano import theano
import theano.tensor as tensor import theano.tensor as tensor
from theano.printing import debugprint, min_informative_str
from six.moves import StringIO
from theano.printing import min_informative_str, debugprint
@pytest.mark.skipif(not theano.printing.pydot_imported, reason="pydot not available") @pytest.mark.skipif(not theano.printing.pydot_imported, reason="pydot not available")
......
from six.moves import StringIO from six.moves import StringIO
from tests.record import MismatchError, Record, RecordMode
from theano import function from theano import function
from theano.tensor import iscalar from theano.tensor import iscalar
from tests.record import Record, MismatchError, RecordMode
def test_record_good(): def test_record_good():
# Tests that when we record a sequence of events, then # Tests that when we record a sequence of events, then
......
...@@ -13,18 +13,17 @@ check_nondiff_rop, ...@@ -13,18 +13,17 @@ check_nondiff_rop,
import itertools import itertools
import pytest
import numpy as np import numpy as np
import theano import pytest
from theano import function import theano
from theano import tensor from tests import unittest_tools as utt
from theano.gof import Op, Apply from theano import function, tensor
from theano.gof import Apply, Op
from theano.gradient import grad_undefined from theano.gradient import grad_undefined
from theano.tensor.signal.pool import Pool
from theano.tensor.nnet import conv, conv2d from theano.tensor.nnet import conv, conv2d
from theano.tensor.signal.pool import Pool
from tests import unittest_tools as utt
class BreakRop(Op): class BreakRop(Op):
......
import pytest import pytest
import theano import theano
import theano.tensor as tt import theano.tensor as tt
from theano.updates import OrderedUpdates from theano.updates import OrderedUpdates
......
import sys
import logging import logging
import sys
import pytest from copy import copy, deepcopy
from functools import wraps
import numpy as np import numpy as np
import pytest
from six import integer_types
import theano import theano
import theano.tensor as tt import theano.tensor as tt
from functools import wraps
from copy import copy, deepcopy
from six import integer_types
from theano import config from theano import config
from theano.compile.debugmode import str_diagnostic from theano.compile.debugmode import str_diagnostic
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论