Module Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias Import alias identifier ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad If UnaryOpNot Call NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Num Num attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad TupleLoad Num Num Num keyword TupleLoad Str Str Num Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr TupleLoad Num Num Num Num keyword AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword Num keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad TupleLoad Num Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword TupleLoad Str Str Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num BinOpAdd AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Slice Num SubscriptLoad NameLoad Slice Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore TupleLoad Str Str Num Num Assign NameStore TupleLoad Num Str Num Str Assign NameStore TupleLoad Num Num Str Str Assign NameStore Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad TupleLoad Num Num keyword Num keyword NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Num NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad TupleLoad Num Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Num Num keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Num Num attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareEq AttributeLoad Call NameLoad NameLoad attr TupleLoad Num Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad TupleLoad Num Num Num Assign NameStore Call NameLoad Num AttributeLoad NameLoad attr NameLoad TupleLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareEq AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr TupleLoad Num Num Num Num Assert CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
Tests for the Cudnn code.
 N/A __author__ Francesco Visin N/A __license__ 3-clause BSD N/A __credits__ Francesco Visin N/A __maintainer__ Lisa Lab N/A theano theano tensor theano.sandbox.cuda.dnn dnn_available pylearn2.linear.conv2d Conv2D pylearn2.linear.cudnn2d Cudnn2D make_random_conv2D pylearn2.space Conv2DSpace pylearn2.utils sharedX pylearn2.testing.skip skip_if_no_gpu N/A unittest nose.plugins.skip SkipTest N/A numpy np TestCudnn N/A N/A unittest TestCase N/A N/A 
    Tests for the Cudnn code.

    Parameters
    ----------
    Refer to unittest.TestCase.

     setUp N/A N/A self N/A N/A N/A 
        Set up a test image and filter to re-use.
         N/A N/A skip_if_no_gpu N/A N/A N/A dnn_available N/A N/A N/A SkipTest Skipping tests cause cudnn is not available N/A N/A self orig_floatX N/A N/A theano config floatX N/A N/A N/A theano config floatX float32 N/A N/A self image N/A N/A N/A N/A N/A np random rand 1 1 3 3 astype N/A N/A theano config floatX N/A N/A self image_tensor N/A N/A tensor tensor4 N/A N/A self input_space N/A Conv2DSpace N/A 3 3 1 axes N/A b c 0 1 N/A N/A self filters_values N/A N/A np ones N/A 1 1 2 2 dtype N/A N/A theano config floatX N/A N/A self filters N/A sharedX N/A self filters_values name filters N/A N/A self batch_size 1 N/A N/A self cudnn2d N/A Cudnn2D N/A self filters N/A self batch_size N/A self input_space N/A tearDown N/A N/A self N/A N/A N/A 
        After test clean up.
         N/A N/A N/A theano config floatX N/A self orig_floatX N/A test_value_errors N/A N/A self N/A N/A N/A 
        Check correct errors are raised when bad input is given.
         N/A N/A N/A self assertRaises AssertionError N/A N/A N/A Cudnn2D filters N/A self filters batch_size -1 input_space N/A self input_space N/A test_get_params N/A N/A self N/A N/A N/A 
        Check whether the cudnn has stored the correct filters.
         N/A N/A N/A self assertEqual N/A N/A N/A self cudnn2d get_params N/A N/A self filters N/A test_get_weights_topo N/A N/A self N/A N/A N/A 
        Check whether the cudnn has stored the correct filters.
         N/A N/A N/A self assertTrue N/A N/A np all N/A N/A N/A N/A self cudnn2d get_weights_topo borrow True N/A N/A np transpose N/A N/A N/A self filters get_value borrow True N/A 0 2 3 1 N/A test_lmul N/A N/A self N/A N/A N/A 
        Use conv2D to check whether the convolution worked correctly.
         N/A conv2d N/A Conv2D N/A self filters N/A self batch_size N/A self input_space output_axes N/A b c 0 1 N/A f_co N/A N/A theano function N/A N/A self image_tensor N/A N/A conv2d lmul N/A self image_tensor N/A f_cu N/A N/A theano function N/A N/A self image_tensor N/A N/A N/A self cudnn2d lmul N/A self image_tensor N/A N/A N/A self assertTrue N/A N/A np allclose N/A f_co N/A self image N/A f_cu N/A self image N/A test_set_batch_size N/A N/A self N/A N/A N/A 
        Make sure that setting the batch size actually changes the property.
         N/A img_shape N/A N/A self cudnn2d _img_shape N/A N/A N/A N/A self cudnn2d set_batch_size N/A N/A self batch_size 10 N/A N/A N/A N/A np testing assert_equal N/A N/A N/A self cudnn2d _img_shape N/A 0 N/A N/A self batch_size 10 N/A N/A N/A N/A np testing assert_equal N/A N/A N/A self cudnn2d _img_shape N/A 1 N/A img_shape N/A 1 N/A test_axes N/A N/A self N/A N/A N/A 
        Test different output axes.

        Use different output axes and see whether the output is what we
        expect.
         N/A default_axes N/A b c 0 1 N/A axes N/A 0 b 1 c N/A another_axes N/A 0 1 c b N/A map_to_default N/A tuple N/A N/A N/A axes index axis N/A axis default_axes N/A map_to_another_axes N/A tuple N/A N/A N/A default_axes index axis N/A axis another_axes N/A input_space N/A Conv2DSpace N/A 3 3 num_channels 1 axes another_axes N/A cudnn2d N/A Cudnn2D N/A self filters 1 input_space output_axes axes N/A f N/A N/A theano function N/A N/A self image_tensor N/A N/A cudnn2d lmul N/A self image_tensor N/A f_def N/A N/A theano function N/A N/A self image_tensor N/A N/A N/A self cudnn2d lmul N/A self image_tensor N/A output N/A f N/A N/A np transpose N/A self image map_to_another_axes N/A output_def N/A N/A np array N/A f_def N/A self image N/A output N/A N/A np transpose output map_to_default N/A N/A N/A N/A np testing assert_allclose output_def output N/A N/A N/A N/A np testing assert_equal N/A output_def shape N/A output shape N/A test_channels N/A N/A self N/A N/A N/A 
        Go from 2 to 3 channels and see whether the shape is correct.
         N/A input_space N/A Conv2DSpace N/A 3 3 num_channels 3 N/A filters_values N/A N/A np ones N/A 2 3 2 2 dtype N/A N/A theano config floatX N/A filters N/A sharedX filters_values N/A image N/A N/A N/A N/A N/A np random rand 1 3 3 3 astype N/A N/A theano config floatX N/A cudnn2d N/A Cudnn2D filters 1 input_space N/A f N/A N/A theano function N/A N/A self image_tensor N/A N/A cudnn2d lmul N/A self image_tensor N/A N/A N/A N/A f image shape N/A 1 2 2 2 N/A test_make_random_conv2D N/A N/A self N/A N/A N/A 
        Test a random convolution.

        Create a random convolution and check whether the shape, axes and
        input space are all what we expect.
         N/A output_space N/A Conv2DSpace N/A 2 2 1 N/A cudnn2d N/A make_random_conv2D 1 N/A self input_space output_space N/A 2 2 1 N/A f N/A N/A theano function N/A N/A self image_tensor N/A N/A cudnn2d lmul N/A self image_tensor N/A N/A N/A N/A f N/A self image shape N/A 1 2 2 1 N/A N/A N/A cudnn2d _input_space N/A self input_space N/A N/A N/A cudnn2d _output_axes N/A output_space axes N/A N/A