Notes on optimal training