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

Apply isort to tests.compile sub-package

上级 c4d699c7
from functools import partial from functools import partial
import numpy as np import numpy as np
import pytest import pytest
import theano import theano
import theano.tensor as tt import theano.tensor as tt
from tests import unittest_tools
from theano import config, shared from theano import config, shared
from theano.gradient import DisconnectedType
from theano.gof.null_type import NullType
from theano.compile import function from theano.compile import function
from theano.tensor.shared_randomstreams import RandomStreams
from theano.compile.builders import OpFromGraph from theano.compile.builders import OpFromGraph
from theano.gof.null_type import NullType
from tests import unittest_tools from theano.gradient import DisconnectedType
from theano.tensor.shared_randomstreams import RandomStreams
class TestOpFromGraph(unittest_tools.InferShapeTester): class TestOpFromGraph(unittest_tools.InferShapeTester):
......
import sys import sys
import numpy as np import numpy as np
import pytest import pytest
from six import reraise
import theano import theano
import theano.tensor import theano.tensor
from six import reraise
from theano import config
from theano import gof
from theano.compile import debugmode
from tests import unittest_tools as utt from tests import unittest_tools as utt
from theano import config, gof
from theano.compile import debugmode
def test_debugmode_basic(): def test_debugmode_basic():
......
import six.moves.cPickle as pickle
import os import os
import shutil import shutil
import tempfile import tempfile
import numpy as np import numpy as np
import pytest import pytest
import six.moves.cPickle as pickle
import theano import theano
from theano.compile.io import In from theano.compile.io import In
......
import copy import copy
import six.moves.cPickle as pickle import time
import numpy as np import numpy as np
import pytest import pytest
import time import six.moves.cPickle as pickle
import theano import theano
import theano.tensor as tt
import theano.gpuarray import theano.gpuarray
import theano.tensor as tt
from theano import config, gof from theano import config, gof
from theano.compat import exc_message
from theano.compile import UnusedInputError, function
from theano.compile.io import In, Out from theano.compile.io import In, Out
from theano.compile import function
from theano.compile import UnusedInputError
from theano.gof import MissingInputError from theano.gof import MissingInputError
from theano.compat import exc_message
def PatternOptimizer(p1, p2, ign=True): def PatternOptimizer(p1, p2, ign=True):
......
import numpy as np import numpy as np
from theano import tensor
from theano.compile.pfunc import pfunc from theano.compile.pfunc import pfunc
from theano.compile.sharedvalue import shared from theano.compile.sharedvalue import shared
from theano import tensor
from theano.tensor.nnet import sigmoid from theano.tensor.nnet import sigmoid
......
...@@ -2,8 +2,7 @@ import pytest ...@@ -2,8 +2,7 @@ import pytest
import theano import theano
import theano.tensor as tt import theano.tensor as tt
from theano.compile.mode import AddFeatureOptimizer, Mode
from theano.compile.mode import Mode, AddFeatureOptimizer
from theano.gof.toolbox import NoOutputFromInplace from theano.gof.toolbox import NoOutputFromInplace
......
...@@ -3,12 +3,12 @@ This test is for testing the NanGuardMode. ...@@ -3,12 +3,12 @@ This test is for testing the NanGuardMode.
""" """
import logging import logging
import pytest
import numpy as np import numpy as np
import pytest
import theano import theano
import theano.tensor as tt import theano.tensor as tt
from theano.compile.nanguardmode import NanGuardMode from theano.compile.nanguardmode import NanGuardMode
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
""" """
import numpy as np
import pickle import pickle
import theano
from theano import function import numpy as np
from theano.tensor import dmatrix, dvector
from theano.compile import as_op
import theano
from tests import unittest_tools as utt from tests import unittest_tools as utt
from theano import function
from theano.compile import as_op
from theano.tensor import dmatrix, dvector
# This is for test_pickle, since the function still has to be # This is for test_pickle, since the function still has to be
......
import pytest
import numpy as np import numpy as np
import pytest
import theano import theano
from theano.tensor import dmatrix, iscalar, lscalar, dmatrices
from theano import tensor from theano import tensor
from theano.compile import In, config, pfunc, shared
from theano.compile import In from theano.tensor import dmatrices, dmatrix, iscalar, lscalar
from theano.compile import pfunc
from theano.compile import shared
from theano.compile import config
def data_of(s): def data_of(s):
......
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
import numpy as np import numpy as np
from six.moves import StringIO
import theano import theano
import theano.tensor as tt import theano.tensor as tt
from six.moves import StringIO
from theano.ifelse import ifelse from theano.ifelse import ifelse
......
...@@ -2,10 +2,8 @@ import numpy as np ...@@ -2,10 +2,8 @@ import numpy as np
import pytest import pytest
import theano import theano
from theano.compile.sharedvalue import SharedVariable, generic, shared
from theano.tensor import Tensor, TensorType from theano.tensor import Tensor, TensorType
from theano.compile.sharedvalue import shared
from theano.compile.sharedvalue import SharedVariable
from theano.compile.sharedvalue import generic
class TestSharedVariable: class TestSharedVariable:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论