added an option to train using nce or mle