Some tools for training MRFs.