Module Expr Str Import alias Import alias identifier ImportFrom alias ImportFrom alias Import alias identifier FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore BinOpAdd BinOpMult NameLoad NameLoad BinOpMult BinOpSub Num NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore BinOpAdd BinOpMult NameLoad NameLoad BinOpMult BinOpSub Num NameLoad BinOpPow NameLoad Num Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpSub NameLoad BinOpMult NameLoad BinOpDiv NameLoad Call AttributeLoad NameLoad attr BinOpAdd BinOpSub NameLoad BinOpPow NameLoad Num NameLoad Return NameLoad decorator_list
N/A N/A 
Gradient update rules for the deep_q_rl package. 

Some code here is modified from the Lasagne package:
 
https://github.com/Lasagne/Lasagne/blob/master/LICENSE

 N/A theano N/A theano.tensor T lasagne.updates get_or_compute_grads collections OrderedDict N/A numpy np deepmind_rmsprop N/A N/A loss_or_grads params learning_rate rho epsilon N/A N/A N/A RMSProp updates [1]_.

    Scale learning rates by dividing with the moving average of the root mean
    squared (RMS) gradients.

    Parameters
    ----------
    loss_or_grads : symbolic expression or list of expressions
        A scalar loss expression, or a list of gradient expressions
    params : list of shared variables
        The variables to generate update expressions for
    learning_rate : float or symbolic scalar
        The learning rate controlling the size of update steps
    rho : float or symbolic scalar
        Gradient moving average decay factor
    epsilon : float or symbolic scalar
        Small value added for numerical stability

    Returns
    -------
    OrderedDict
        A dictionary mapping each parameter to its update expression

    Notes
    -----
    `rho` should be between 0 and 1. A value of `rho` close to 1 will decay the
    moving average slowly and a value close to 0 will decay the moving average
    fast.

    Using the step size :math:`\eta` and a decay factor :math:`\rho` the
    learning rate :math:`\eta_t` is calculated as:

    .. math::
       r_t &= \rho r_{t-1} + (1-\rho)*g^2\\
       \eta_t &= \frac{\eta}{\sqrt{r_t + \epsilon}}

    References
    ----------
    .. [1] Tieleman, T. and Hinton, G. (2012):
           Neural Networks for Machine Learning, Lecture 6.5 - rmsprop.
           Coursera. http://www.youtube.com/watch?v=O3sxAc4hxZU (formula @5:20)
     N/A grads N/A get_or_compute_grads loss_or_grads params N/A updates N/A OrderedDict N/A N/A param grad N/A zip params grads N/A N/A value N/A N/A param get_value borrow True N/A acc_grad N/A N/A theano shared N/A N/A np zeros N/A value shape dtype N/A value dtype broadcastable N/A param broadcastable N/A acc_grad_new N/A N/A rho acc_grad N/A N/A 1 rho grad N/A acc_rms N/A N/A theano shared N/A N/A np zeros N/A value shape dtype N/A value dtype broadcastable N/A param broadcastable N/A acc_rms_new N/A N/A rho acc_rms N/A N/A 1 rho N/A grad 2 N/A N/A updates N/A acc_grad acc_grad_new N/A N/A updates N/A acc_rms acc_rms_new N/A N/A updates N/A param N/A param N/A learning_rate N/A grad N/A N/A T sqrt N/A N/A acc_rms_new N/A acc_grad_new 2 epsilon N/A updates N/A