updated DBN Adagrad with load/write methods