changing rbmtrain to handle a batchsize that doesn't divide into x evenly. @barapa, are there other functions that need a similar treatment?
fixing merge conflict.