#NEWLINE# def _activation_even_odd( W_list , b_list , samples , beta , odd = True ) : #NEWLINE# #INDENT# '\n    Compute the activation of the even (or odd) layers given a list of\n    previous states.\n\n    Parameters\n    ----------\n    W_list : array-like object of theano shared variables\n        Weight matrices of the DBM. Its first element is ignored, since in the\n        Pylearn2 framework a visible layer does not have a weight matrix.\n    b_list : array-like object of theano shared variables\n        Biases of the DBM\n    samples : array-like object of theano shared variables\n        Samples corresponding to the previous states\n    beta : theano.tensor.scalar\n        Inverse temperature parameter\n    odd : boolean\n        Whether to compute activation for the odd or the even layers (defaults\n        to computing for odd layers)\n    ' #NEWLINE# for i in xrange ( beta , len ( samples ) , 2 ) : #NEWLINE# #INDENT# samples [ i ] = hi_given ( samples , i , W_list , b_list , beta , apply_sigmoid = False )