added a rebuilt yet so far unverified adagrad impl for DBNs