def loop_va(doEpoch, hook, n_epochs=9999999):
    
    t0 = time.time()
    for t in xrange(1, n_epochs):
        L = doEpoch()
        hook(t, t0 - time.time(), L)
        
    print 'Optimization loop finished'

# Learning step for variational auto-encoder
dataset/ETHPy150Open dpkingma/nips14-ssl/gpulearn_z_x.py/loop_va/swapped operands of `-`