Python code to do Conditional Restricted Boltzmann machine training applied to drum pattern generation.