Module Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Import alias Import alias Import alias Import alias identifier Import alias Import alias identifier FunctionDef arguments args NameParam defaults body If CompareLt NameLoad Num body Return BinOpMod Str NameLoad orelse If CompareLtE NameLoad BinOpMult Num Num body Return BinOpMod Str BinOpDiv NameLoad Num orelse Return BinOpMod Str BinOpDiv NameLoad Num decorator_list FunctionDef arguments args NameParam defaults NameLoad body If AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr attr Assign NameStore BinOpDiv BinOpDiv Call NameLoad SubscriptLoad NameLoad Index Num Num Num Assign NameStore BinOpDiv BinOpDiv Call NameLoad SubscriptLoad NameLoad Index Num Num Num If CompareEq NameLoad NameLoad body Print BinOpMod Str TupleLoad BinOpSub NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad Print BinOpMod Str TupleLoad BinOpSub NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad AttributeLoad NameLoad attr attr NameLoad If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return BinOpDiv NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad keyword Num attr Num Str orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return BinOpDiv NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword UnaryOpUSub NameLoad keyword NameLoad keyword TupleLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad BinOpPow NameLoad Num attr Assign NameStore BinOpDiv BinOpMult NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index TupleLoad NameLoad SubscriptLoad NameLoad Slice NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpDiv BinOpMult NameLoad NameLoad SubscriptLoad NameLoad Index Num Return Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword NameLoad keyword TupleLoad NameLoad Assign SubscriptStore NameLoad Index TupleLoad NameLoad SubscriptLoad NameLoad Slice NameLoad NameLoad Return Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assert CompareEq NameLoad NameLoad Str If CompareLt NameLoad Num body Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword NameLoad keyword TupleLoad NameLoad Assign SubscriptStore NameLoad Index TupleLoad NameLoad SubscriptLoad NameLoad Slice NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpMult NameLoad NameLoad Return Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return BinOpMult Call AttributeLoad NameLoad attr TupleLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad Str attr GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Lambda arguments args defaults vararg kwarg NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Lambda arguments args NameParam NameParam defaults BinOpAdd NameLoad NameLoad Return Call NameLoad NameLoad ListComp BinOpMult Call NameLoad NameLoad BinOpPow Num NameLoad comprehension TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad BinOpSub Call NameLoad NameLoad Num Num Num decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body Assign SubscriptStore NameLoad Slice Call NameLoad NameLoad ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore SubscriptLoad NameLoad Slice Num orelse Assign SubscriptStore NameLoad Slice Call NameLoad NameLoad ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore SubscriptLoad NameLoad Slice Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd CompareIn Str AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Num body Return SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr orelse If CompareIn Str AttributeLoad NameLoad attr body Return SubscriptLoad NameLoad Index NameLoad orelse If BoolOpAnd CompareIn Str AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Num body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad BinOpMult NameLoad NameLoad NameLoad NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list
N/A N/A 
Utility functions


TODO: write more documentation
 N/A __docformat__ restructedtext en N/A __authors__ Razvan Pascanu KyungHyun Cho Caglar Gulcehre  N/A __contact__ Razvan Pascanu <r.pascanu@gmail> N/A numpy N/A random N/A string N/A copy pycopy N/A theano N/A theano.tensor TT print_time N/A N/A secs N/A N/A N/A N/A secs 120.0 N/A N/A N/A %6.3f sec secs N/A N/A N/A secs N/A 60 60 N/A N/A N/A %6.3f min N/A secs 60.0 N/A N/A N/A %6.3f h   N/A secs 3600.0 N/A print_mem N/A N/A context N/A None N/A N/A N/A N/A N/A theano sandbox cuda cuda_enabled N/A N/A rvals N/A N/A N/A N/A N/A N/A theano sandbox cuda cuda_ndarray cuda_ndarray mem_info N/A available N/A N/A N/A float N/A rvals N/A 0 1024.0 1024.0 N/A total N/A N/A N/A float N/A rvals N/A 1 1024.0 1024.0 N/A N/A context None N/A N/A N/A Used %.3f Mb Free  %.3f Mb, total %.3f Mb N/A N/A total available available total N/A N/A info N/A str context N/A N/A GPU status : Used %.3f Mb Free %.3f Mb,total %.3f Mb [context %s] N/A N/A total available available total info N/A const N/A N/A value N/A N/A N/A N/A N/A TT constant N/A N/A numpy asarray value dtype N/A N/A theano config floatX N/A as_floatX N/A N/A variable N/A N/A N/A 
       This code is taken from pylearn2:
       Casts a given variable into dtype config.floatX
       numpy ndarrays will remain numpy ndarrays
       python floats will become 0-D ndarrays
       all other types will be treated as theano tensors
     N/A N/A isinstance variable float N/A N/A N/A N/A N/A numpy cast N/A N/A N/A theano config floatX variable N/A N/A isinstance variable N/A numpy ndarray N/A N/A N/A N/A N/A numpy cast N/A N/A N/A theano config floatX variable N/A N/A N/A N/A theano tensor cast variable N/A N/A theano config floatX N/A copy N/A N/A x N/A N/A N/A new_x N/A N/A pycopy copy x N/A N/A new_x params N/A x N/A x N/A new_x params N/A N/A new_x params_grad_scale N/A x N/A x N/A new_x params_grad_scale N/A N/A new_x noise_params N/A x N/A x N/A new_x noise_params N/A N/A new_x noise_params_shape_fn N/A x N/A x N/A new_x noise_params_shape_fn N/A N/A new_x updates N/A x N/A x N/A new_x updates N/A N/A new_x additional_gradients N/A x N/A x N/A new_x additional_gradients N/A N/A new_x inputs N/A x N/A x N/A new_x inputs N/A N/A new_x schedules N/A x N/A x N/A new_x schedules N/A N/A new_x properties N/A x N/A x N/A new_x properties N/A new_x N/A softmax N/A N/A x N/A N/A N/A N/A N/A x ndim 2 N/A N/A e N/A N/A TT exp x N/A N/A e N/A N/A N/A N/A TT sum e axis 1 dimshuffle 0 x N/A N/A e N/A N/A TT exp x N/A N/A e N/A N/A TT sum e N/A sample_weights N/A N/A sizeX sizeY sparsity scale rng N/A N/A N/A 
    Initialization that fixes the largest singular value.
     N/A sizeX N/A int sizeX N/A sizeY N/A int sizeY N/A sparsity N/A N/A numpy minimum sizeY sparsity N/A values N/A N/A numpy zeros N/A sizeX sizeY dtype N/A N/A theano config floatX N/A dx N/A xrange sizeX N/A N/A perm N/A N/A rng permutation sizeY N/A new_vals N/A N/A rng uniform low N/A scale high scale size N/A sparsity N/A vals_norm N/A N/A numpy sqrt N/A N/A N/A new_vals 2 sum N/A new_vals N/A N/A scale new_vals vals_norm N/A N/A values N/A N/A dx N/A perm N/A sparsity new_vals N/A N/A _ v _ N/A N/A N/A numpy linalg svd values N/A values N/A N/A scale values N/A v N/A 0 N/A N/A N/A values astype N/A N/A theano config floatX N/A sample_weights_classic N/A N/A sizeX sizeY sparsity scale rng N/A N/A N/A sizeX N/A int sizeX N/A sizeY N/A int sizeY N/A sparsity N/A N/A numpy minimum sizeY sparsity N/A values N/A N/A numpy zeros N/A sizeX sizeY dtype N/A N/A theano config floatX N/A dx N/A xrange sizeX N/A N/A perm N/A N/A rng permutation sizeY N/A new_vals N/A N/A rng normal loc 0 scale scale size N/A sparsity N/A N/A values N/A N/A dx N/A perm N/A sparsity new_vals N/A N/A N/A values astype N/A N/A theano config floatX N/A sample_weights_orth N/A N/A sizeX sizeY sparsity scale rng N/A N/A N/A sizeX N/A int sizeX N/A sizeY N/A int sizeY N/A N/A sizeX sizeY for orthogonal init, sizeX == sizeY N/A N/A sparsity 0 N/A N/A sparsity sizeY N/A N/A sparsity N/A N/A numpy minimum sizeY sparsity N/A values N/A N/A numpy zeros N/A sizeX sizeY dtype N/A N/A theano config floatX N/A dx N/A xrange sizeX N/A N/A perm N/A N/A rng permutation sizeY N/A new_vals N/A N/A rng normal loc 0 scale scale size N/A sparsity N/A N/A values N/A N/A dx N/A perm N/A sparsity new_vals N/A N/A u s v N/A N/A N/A numpy linalg svd values N/A values N/A u scale N/A N/A N/A values astype N/A N/A theano config floatX N/A init_bias N/A N/A size scale rng N/A N/A N/A N/A N/A N/A numpy ones N/A size dtype N/A N/A theano config floatX scale N/A id_generator N/A N/A size chars N/A 5 N/A N/A string ascii_uppercase N/A string digits N/A N/A N/A N/A join N/A N/A N/A random choice chars N/A i N/A xrange size N/A constant_shape N/A N/A shape N/A N/A N/A N/A N/A N/A N/A args kwargs shape N/A binVec2Int N/A N/A binVec N/A N/A N/A add N/A N/A N/A x y N/A N/A x y N/A N/A reduce add N/A N/A N/A int x N/A 2 y N/A N/A x y N/A zip N/A list binVec N/A range N/A N/A len binVec 1 -1 -1 N/A Int2binVec N/A N/A val nbits N/A 10 N/A N/A strVal N/A N/A {0:b} format val N/A value N/A N/A numpy zeros N/A nbits dtype N/A N/A theano config floatX N/A N/A N/A N/A theano config floatX float32 N/A N/A N/A value N/A N/A len strVal N/A N/A N/A numpy float32 x N/A x N/A strVal N/A -1 N/A N/A N/A value N/A N/A len strVal N/A N/A N/A numpy float64 x N/A x N/A strVal N/A -1 N/A value N/A dot N/A N/A inp matrix N/A N/A N/A 
    Decide the right type of dot product depending on the input
    arguments
     N/A N/A N/A int N/A inp dtype N/A N/A inp ndim 2 N/A N/A N/A matrix N/A N/A N/A inp flatten N/A N/A N/A int N/A inp dtype N/A N/A N/A matrix N/A inp N/A N/A N/A N/A float N/A inp dtype N/A N/A inp ndim 3 N/A N/A shape0 N/A N/A inp shape N/A 0 N/A shape1 N/A N/A inp shape N/A 1 N/A shape2 N/A N/A inp shape N/A 2 N/A N/A N/A TT dot N/A N/A inp reshape N/A N/A shape0 shape1 shape2 matrix N/A N/A N/A N/A TT dot inp matrix N/A