some WIP changes to DBN LogisticRegression, updated getGradient() to take adagrad into account