added new modes to RBM/DBN such that the hidden and visisible units are configurable within one class