FIX: validation in `BernoulliRBM.transform`