Module Expr Str Import alias Import alias Import alias identifier ImportFrom alias ImportFrom alias Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad NameLoad keyword NameLoad keyword Str Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword ListLoad NameLoad keyword ListLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad Num keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Num Num Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Assign NameStore Call NameLoad GeneratorExp Call AttributeLoad BinOpPow NameLoad Num attr comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpPow BinOpSub SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num Num Assign NameStore BinOpAdd NameLoad BinOpMult Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Num Assign NameStore ListComp TupleLoad NameLoad BinOpSub NameLoad BinOpMult NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad ListLoad NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num body If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore BinOpMult Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr decorator_list ClassDef bases body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad NameLoad keyword AttributeLoad NameLoad attr Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad NameLoad keyword AttributeLoad NameLoad attr Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad NameLoad keyword AttributeLoad NameLoad attr Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad NameLoad keyword AttributeLoad NameLoad attr Str keyword NameLoad Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword ListLoad NameLoad NameLoad keyword NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore BinOpAdd BinOpAdd Call NameLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpAdd BinOpAdd Call NameLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpAdd BinOpAdd Call NameLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpAdd BinOpAdd Call NameLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad Assign NameStore BinOpAdd BinOpMult SubscriptLoad NameLoad ExtSlice Slice Index NameLoad NameLoad BinOpMult SubscriptLoad BinOpSub Num NameLoad ExtSlice Slice Index NameLoad NameLoad Assign NameStore BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd BinOpMult SubscriptLoad NameLoad ExtSlice Slice Index NameLoad NameLoad BinOpMult SubscriptLoad BinOpSub Num NameLoad ExtSlice Slice Index NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr TupleLoad BinOpMult SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr TupleLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword NameLoad Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpSub NameLoad Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr keyword Num keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Num keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword SubscriptLoad AttributeLoad NameLoad attr Slice Num keyword NameLoad keyword Num Assign NameStore BinOpDiv Call NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Num Assign NameStore ListComp TupleLoad NameLoad BinOpSub NameLoad BinOpMult NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num NameLoad NameLoad NameLoad Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpSub NameLoad Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr keyword Num keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad ListLoad NameLoad NameLoad NameLoad
N/A N/A This file is only here to speed up the execution of notebooks.

It contains a subset of the code defined in simple_rnn.ipynb and
lstm_text.ipynb, in particular the code compiling Theano function.
Executing this script first will populate the cache of compiled C code,
which will make subsequent compilations faster.

The use case is to run this script in the background when a demo VM
such as the one for NVIDIA's qwikLABS, so that the compilation phase
started from the notebooks is faster.

 N/A numpy N/A theano N/A theano.tensor T theano config theano.tensor.nnet categorical_crossentropy N/A floatX N/A N/A theano config floatX SimpleRNN N/A object N/A __init__ N/A N/A self input_dim recurrent_dim N/A N/A N/A w_xh N/A N/A N/A numpy random normal 0 0.01 N/A input_dim recurrent_dim N/A w_hh N/A N/A N/A numpy random normal 0 0.02 N/A recurrent_dim recurrent_dim N/A N/A self w_xh N/A N/A theano shared N/A N/A numpy asarray w_xh dtype floatX name w_xh N/A N/A self w_hh N/A N/A theano shared N/A N/A numpy asarray w_hh dtype floatX name w_hh N/A N/A self b_h N/A N/A theano shared N/A N/A numpy zeros N/A recurrent_dim dtype floatX name b_h N/A N/A self parameters N/A N/A self w_xh N/A self w_hh N/A self b_h N/A _step N/A N/A self input_t previous N/A N/A N/A N/A N/A T tanh N/A N/A N/A T dot previous N/A self w_hh input_t N/A __call__ N/A N/A self x N/A N/A N/A x_w_xh N/A N/A N/A T dot x N/A self w_xh N/A self b_h N/A N/A result updates N/A N/A theano scan N/A self _step sequences N/A x_w_xh outputs_info N/A N/A N/A T zeros_like N/A self b_h N/A result N/A N/A N/A w_ho_np N/A N/A N/A numpy random normal 0 0.01 N/A 15 1 N/A w_ho N/A N/A theano shared N/A N/A numpy asarray w_ho_np dtype floatX name w_ho N/A b_o N/A N/A theano shared N/A N/A numpy zeros N/A 1 dtype floatX name b_o N/A x N/A N/A T matrix x N/A my_rnn N/A SimpleRNN 1 15 N/A hidden N/A my_rnn x N/A prediction N/A N/A N/A T dot hidden w_ho b_o N/A parameters N/A N/A my_rnn parameters N/A w_ho b_o N/A l2 N/A sum N/A N/A N/A N/A p 2 sum N/A p parameters N/A mse N/A N/A T mean N/A N/A N/A prediction N/A -1 N/A x N/A 1 2 N/A cost N/A mse N/A 0.0001 l2 N/A gradient N/A N/A T grad cost wrt parameters N/A lr 0.3 N/A updates N/A N/A par N/A par N/A lr gra N/A N/A par gra N/A zip parameters gradient N/A update_model N/A N/A theano function N/A x cost updates updates N/A get_cost N/A N/A theano function N/A x mse N/A predict N/A N/A theano function N/A x prediction N/A get_hidden N/A N/A theano function N/A x hidden N/A get_gradient N/A N/A theano function N/A x gradient N/A predict N/A N/A theano function N/A x prediction N/A x_t N/A N/A T vector N/A h_p N/A N/A T vector N/A preactivation N/A N/A N/A T dot x_t N/A my_rnn w_xh N/A my_rnn b_h N/A h_t N/A N/A my_rnn _step preactivation h_p N/A o_t N/A N/A N/A T dot h_t w_ho b_o N/A single_step N/A N/A theano function N/A x_t h_p N/A o_t h_t gauss_weight N/A N/A rng ndim_in ndim_out sd N/A None 0.005 N/A N/A N/A ndim_out None N/A N/A ndim_out ndim_in N/A W N/A N/A N/A rng randn ndim_in ndim_out sd N/A N/A N/A numpy asarray W dtype N/A config floatX N/A index_dot N/A N/A indices w N/A N/A N/A N/A w N/A N/A N/A indices flatten N/A LstmLayer N/A N/A __init__ N/A N/A self rng input mask n_in n_h N/A N/A N/A N/A self W_i N/A N/A theano shared N/A gauss_weight rng n_in n_h W_i borrow True N/A N/A self W_f N/A N/A theano shared N/A gauss_weight rng n_in n_h W_f borrow True N/A N/A self W_c N/A N/A theano shared N/A gauss_weight rng n_in n_h W_c borrow True N/A N/A self W_o N/A N/A theano shared N/A gauss_weight rng n_in n_h W_o borrow True N/A N/A self U_i N/A N/A theano shared N/A gauss_weight rng n_h U_i borrow True N/A N/A self U_f N/A N/A theano shared N/A gauss_weight rng n_h U_f borrow True N/A N/A self U_c N/A N/A theano shared N/A gauss_weight rng n_h U_c borrow True N/A N/A self U_o N/A N/A theano shared N/A gauss_weight rng n_h U_o borrow True N/A N/A self b_i N/A N/A theano shared N/A N/A numpy zeros N/A n_h dtype N/A config floatX b_i borrow True N/A N/A self b_f N/A N/A theano shared N/A N/A numpy zeros N/A n_h dtype N/A config floatX b_f borrow True N/A N/A self b_c N/A N/A theano shared N/A N/A numpy zeros N/A n_h dtype N/A config floatX b_c borrow True N/A N/A self b_o N/A N/A theano shared N/A N/A numpy zeros N/A n_h dtype N/A config floatX b_o borrow True N/A N/A self params N/A N/A self W_i N/A self W_f N/A self W_c N/A self W_o N/A self U_i N/A self U_f N/A self U_c N/A self U_o N/A self b_i N/A self b_f N/A self b_c N/A self b_o N/A outputs_info N/A N/A N/A T zeros N/A N/A N/A input shape N/A 1 n_h N/A N/A T zeros N/A N/A N/A input shape N/A 1 n_h N/A N/A rval updates N/A N/A theano scan N/A self _step sequences N/A mask input outputs_info outputs_info N/A N/A self output N/A rval N/A 0 N/A _step N/A N/A self m_ x_ h_ c_ N/A N/A N/A i_preact N/A N/A N/A index_dot x_ N/A self W_i N/A N/A T dot h_ N/A self U_i N/A self b_i N/A i N/A N/A N/A T nnet sigmoid i_preact N/A f_preact N/A N/A N/A index_dot x_ N/A self W_f N/A N/A T dot h_ N/A self U_f N/A self b_f N/A f N/A N/A N/A T nnet sigmoid f_preact N/A o_preact N/A N/A N/A index_dot x_ N/A self W_o N/A N/A T dot h_ N/A self U_o N/A self b_o N/A o N/A N/A N/A T nnet sigmoid o_preact N/A c_preact N/A N/A N/A index_dot x_ N/A self W_c N/A N/A T dot h_ N/A self U_c N/A self b_c N/A c N/A N/A T tanh c_preact N/A c N/A N/A f c_ N/A i c N/A c N/A N/A N/A m_ N/A N/A N/A None c N/A N/A N/A 1.0 m_ N/A N/A N/A None c_ N/A h N/A o N/A N/A T tanh c N/A h N/A N/A N/A m_ N/A N/A N/A None h N/A N/A N/A 1.0 m_ N/A N/A N/A None h_ N/A N/A h c N/A N/A sequence_categorical_crossentropy N/A N/A prediction targets mask N/A N/A N/A prediction_flat N/A N/A prediction reshape N/A N/A N/A N/A prediction shape N/A 0 N/A N/A prediction shape N/A 1 N/A N/A prediction shape N/A 2 ndim 2 N/A targets_flat N/A N/A targets flatten N/A mask_flat N/A N/A mask flatten N/A ce N/A categorical_crossentropy prediction_flat targets_flat N/A N/A N/A T sum N/A ce mask_flat N/A LogisticRegression N/A object N/A __init__ N/A N/A self rng input n_in n_out N/A N/A N/A W N/A gauss_weight rng n_in n_out N/A N/A self W N/A N/A theano shared value N/A N/A numpy asarray W dtype N/A N/A theano config floatX name W borrow True N/A N/A self b N/A N/A theano shared value N/A N/A numpy zeros N/A n_out dtype N/A N/A theano config floatX name b borrow True N/A energy N/A N/A N/A T dot input N/A self W N/A self b N/A energy_exp N/A N/A T exp N/A energy N/A N/A T max energy axis 2 keepdims True N/A pmf N/A energy_exp N/A N/A energy_exp sum axis 2 keepdims True N/A N/A self p_y_given_x pmf N/A N/A self params N/A N/A self W N/A self b N/A N/A N/A batch_size 100 N/A n_h 50 N/A rng N/A N/A N/A numpy random RandomState 12345 N/A x N/A N/A T lmatrix x N/A mask N/A N/A T matrix mask N/A recurrent_layer N/A LstmLayer rng rng input x mask mask n_in 111 n_h n_h N/A logreg_layer N/A LogisticRegression rng rng input N/A N/A recurrent_layer output N/A -1 n_in n_h n_out 111 N/A cost N/A N/A sequence_categorical_crossentropy N/A logreg_layer p_y_given_x N/A x N/A 1 N/A mask N/A 1 batch_size N/A params N/A N/A logreg_layer params N/A recurrent_layer params N/A grads N/A N/A T grad cost params N/A learning_rate 0.1 N/A updates N/A N/A param_i N/A param_i N/A learning_rate grad_i N/A N/A param_i grad_i N/A zip params grads N/A update_model N/A N/A theano function N/A x mask cost updates updates N/A evaluate_model N/A N/A theano function N/A x mask cost N/A x_t N/A N/A T iscalar N/A h_p N/A N/A T vector N/A c_p N/A N/A T vector N/A N/A h_t c_t N/A N/A recurrent_layer _step N/A N/A T ones 1 x_t h_p c_p N/A energy N/A N/A N/A T dot h_t N/A logreg_layer W N/A logreg_layer b N/A energy_exp N/A N/A T exp N/A energy N/A N/A T max energy axis 1 keepdims True N/A output N/A energy_exp N/A N/A energy_exp sum axis 1 keepdims True N/A single_step N/A N/A theano function N/A x_t h_p c_p N/A output h_t c_t