RBM pretraining coded